On 8/4/2011 6:07 PM, Richard Eckart de Castilho wrote: > Am 04.08.2011 um 03:08 schrieb Marshall Schor: > >> Do you use m2eclipse? (see http://uima.apache.org/one-time-setup.html - the >> Eclipse part especially). I'm using the m2eclipse plugin at version >> 0.12.1.20110112-1712. > I use the same version of m2eclipse also in Eclipse 3.6.2. > >> In my Eclipse 3.6.2, the .classpath for uima-ep-jcasgen looks like: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <classpath> >> <classpathentry kind="src" output="target/classes" path="src/main/java"/> >> <classpathentry excluding="**" kind="src" output="target/classes" >> path="src/main/resources"/> >> <classpathentry kind="con" >> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> >> <classpathentry kind="con" >> path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> >> <classpathentry kind="output" path="target/classes"/> >> </classpath> > This looks like the .classpath file generated by m2eclipse which contains > both, the Plug-in Dependencies Libaray and the Maven Dependencies Library. I > prefer this classpath setup. When I run "mvn eclipse:eclipse" this is > changed, however, so that links are generated in the plugin projects pointing > to the jars in the .m2/repository folder and these are added as "References > Libraries" to the build path. I have re-run "Maven->Update project > configuration" to restore the m2eclipse style.
So - I'm missing some fundamental point (probably from not reading this email chain very carefully, over a long period... :-) ). If you're saying that you have the same set up when using m2eclipse, why change to use eclipse:eclipse - which apparently makes things not compile? > > After a lot of trial and error, I came up with this set of steps to get UIMA > imported into my Eclipse (ignoring mvn eclipse:eclipse at the moment): > > * Turn off automatic building (saves some time while UIMA cannot properly > build yet) > * Add "http://svn.apache.org/repos/asf/uima/uimaj" as a SVN repository in > Eclipse > * Check out "trunk" as a project (not as a Maven project) Here's what I did: I got a brand new install of Eclipse 3.6.2. I put into it the subclipse plugin and the m2eclipse plugin. I then used a svn command-line client (not Eclipse) to check out ...uima/uimaj/trunk. Then I used Eclipse -> Import -> Maven -> Existing Maven Projects, and selected the checkout directory. It showed all the projects, and I said proceed. After a while, it was all in, except that uimaj-core had an "error". This I "corrected" by right clicking it, and saying maven -> update project configuration. This is because the "default" m2eclipse install doesn't run the step needed to generate some classes that project needs, but does run it when you say update-project-configuration. At this point, everything is showing no-errors. > * Select "Check out as a project in the workspace" and set the project name > to "uimaj-root" > * Right-click on the "uimaj" folder within the "uimaj-root" project and > select "Run As->Maven build...". > - Enter as goal "clean install". Enter the profile "!process-docbook" to > disable docbook generation (unnecessary time any memory hog). > - Select "skip Tests". On the "Refresh" tab enable "Refresh resources upon > completion" and select "the entire workspace". > - Now run (this may take a while). > - Check the progress by opening a Maven Console from the Eclipse Console > View (small symbol with a "+" at the top right corner). > * Right-click on the "uimaj-root" project and select "Import->Existing Maven > Project" > * After the import is complete, the launch configurations in uimaj-examples > are dirty - revert the changes. > * Right-click on all UIMA projects except "uimaj-root" and select > "Maven->Update project configuration" so the additional source files > generated by Maven are added to the classpath. > * Now build the workspace. I think that you don't need to do things that way. With the import, and the one update-maven-configuration, it all should compile in Eclipse without running any maven things (beyond what m2eclipse does). Of course, that doesn't do everything the "mvn install" command would do (such as building the docbooks etc). But it does compile all the java code. Having done this, I did one other thing - just to see if it would also work without messing things up. I went to a command window, into the uimaj project directory, and ran maven install. It built everything and said "BUILD SUCCESS" at the end: In case it's helpful, here's the last bit of output: [INFO] Reactor Summary: [INFO] [INFO] UIMA Java SDK: uimaj-parent ....................... SUCCESS [1.185s] [INFO] UIMA Base: uimaj-test-util: JUnit utilities ....... SUCCESS [2.983s] [INFO] UIMA Base: uimaj-core ............................. SUCCESS [56.493s] [INFO] UIMA Base: jVinci: Vinci Transport Library ........ SUCCESS [0.966s] [INFO] UIMA Base: uimaj-adapter-vinci: Vinci Adapter ..... SUCCESS [3.253s] [INFO] UIMA Base: uimaj-cpe: Collection Processing Engine SUCCESS [26.088s] [INFO] UIMA Base: uimaj-document-annotation .............. SUCCESS [1.204s] [INFO] UIMA Base: uimaj-tools: Tools ..................... SUCCESS [5.837s] [INFO] UIMA Base: uimaj-examples: SDK Examples ........... SUCCESS [1.094s] [INFO] UIMA Base: uimaj-adapter-soap: SOAP Adapter ....... SUCCESS [0.865s] [INFO] UIMA Base: uimaj-component-test-util: for JUnit ... SUCCESS [0.797s] [INFO] UIMA Eclipse: uimaj-ep-debug ...................... SUCCESS [13.826s] [INFO] UIMA Eclipse: uimaj-ep-jcasgen .................... SUCCESS [1.962s] [INFO] UIMA Eclipse: uimaj-ep-configurator: Descriptor Editor SUCCESS [4.065s] [INFO] UIMA Eclipse: uimaj-ep-pear-packager .............. SUCCESS [2.090s] [INFO] UIMA Eclipse: uimaj-ep-launcher ................... SUCCESS [2.518s] [INFO] UIMA Eclipse: uimaj-ep-cas-editor ................. SUCCESS [3.965s] [INFO] UIMA Eclipse: uimaj-ep-cas-editor-ide ............. SUCCESS [2.050s] [INFO] UIMA Eclipse: uimaj-ep-runtime .................... SUCCESS [16.829s] [INFO] UIMA Eclipse: uimaj-eclipse-feature-tools ......... SUCCESS [0.701s] [INFO] UIMA Eclipse: uimaj-eclipse-feature-runtime ....... SUCCESS [0.644s] [INFO] UIMA Aggregate: aggregate-uimaj-eclipse-plugins ... SUCCESS [0.057s] [INFO] Apache UIMA SDK Documentation - overview and setup SUCCESS [19.136s] [INFO] Apache UIMA SDK Documentation - references ........ SUCCESS [10.408s] [INFO] Apache UIMA SDK Documentation - tools ............. SUCCESS [9.889s] [INFO] Apache UIMA SDK Documentation - tutorials and user's guides SUCCESS [22.763s] [INFO] UIMA Aggregate POM aggregate-uimaj-docbooks: UIMA Base SUCCESS [0.071s] [INFO] UIMA Maven Plugin PearPackagingMavenPlugin ........ SUCCESS [4.408s] [INFO] UIMA Base: uimaj-bootstrap: Bootstrap launcher .... SUCCESS [0.714s] [INFO] UIMA Aggregate: aggregate-uimaj: UIMA Base ........ SUCCESS [0.065s] [INFO] UIMA Base: uimaj-distr ............................ SUCCESS [58.816s] [INFO] UIMA Java SDK: uimaj .............................. SUCCESS [0.090s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4:37.560s [INFO] Finished at: Sat Aug 06 21:53:12 EDT 2011 [INFO] Final Memory: 32M/191M [INFO] ------------------------------------------------------------------------ Then I went back into Eclipse and clicked "Refresh" on all projects. The refresh happened, and all the projects were still OK - no errors. > > Now I am getting this error: > > 04.08.11 23:57:56 MESZ: Build errors for uimaj-ep-runtime; > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies > (unpackDependentJars) on project uimaj-ep-runtime: Error unpacking file: > /Users/bluefire/UKP/Workspaces/dkpro-primary/uimaj-root/jVinci/target/classes > to: > /Users/bluefire/UKP/Workspaces/dkpro-primary/uimaj-root/uimaj-ep-runtime/target/classes > org.codehaus.plexus.archiver.ArchiverException: The source must not be a > directory. > 04.08.11 23:57:56 MESZ: [ERROR] An internal error occurred null > > Do you also get this error with your m2eclipse-based setup, Marshal? no - I don't get any errors for my install (other than uimaj-core initial import build, needed that update-maven-configuration step). > > I didn't try yet to "run" the CAS Editor from within Eclipse. To really test > that, I would need to set up another Eclipse which does not have the UIMA > runtime bundle installed. Since CAS Editor and UIMA-J are currently one > "project", I don't understand this. In my setup, uimaj and the cas editor are 2 Eclipse projects, not one. > I would expect/desire to be able to run the CAS Editor without previously > installing the UIMA runtime plugin into the Eclipse instance. Eclipse has a mechanism for doing debug (or regular) launches of "Eclipse Applications", which does just what you want - launches a "child" version of Eclipse, and lets you pick which plugins to have as pre-installed, and which ones should be the ones under test and come from the "parent" Eclipse. -Marshall > > -- Richard >
