Thanks for your exhaustive answer. Marshal. To avoid unnecessary discussions I won't reply directly to most of the questions. Instead, I'll try to focus on repeating and documenting the steps suggested by Marshal and try to use clearer language to avoid misunderstandings. I have divided this mail into three sections:
I) Checking out UIMA - reproducing the steps Marshal explained in his last mail
II) Running the CAS Editor - (trying to) run CAS Editor to run
III) Resume
=== I) Checking out UIMA ===
I've repeated your steps:
1) Just to make everything as clean as possible, I moved my settings.xml and ~/.m2/repository out of the way.
* Marshal: get a brand new install of Eclipse 3.6.2. I put into it the subclipse plugin and the m2eclipse plugin.
2) I fetched the Eclipse 3.6.2 Classic OS X 64bit Cocoa distribution from http://www.eclipse.org/downloads/packages/eclipse-classic-362/heliossr2
3) I installed subclipse from http://subclipse.tigris.org/update_1.6.x
4) I installed m2eclipse from http://m2eclipse.sonatype.org/sites/m2e
- Maven Integration for Eclipse (Required) 0.12.20110112-1712
Note: Eclipse 3.6.2 Classic is the one that includes all the PDE stuff, but does not come with Subversive.
* Marshal: use a svn command-line client (not Eclipse) to check out ...uima/uimaj/trunk.
5) I started a fresh workspace
6) I checked the stuff out on the command line using
svn checkout http://svn.apache.org/repos/asf/uima/uimaj/trunk uimaj-root
* Marshal: use Eclipse -> Import -> Maven -> Existing Maven Projects, and select the checkout directory.
7) I started Eclipse and waited until the "Updating indexes" had completed.
8) I imported the "uimaj-root" folder into which I had done the checking out.
* Marshal: after a while, it was all in, except that uimaj-core had an "error".
Now after a while Eclipse is done and there are lots of errors because artifacts cannot be found.
BLOCKER: A blocker for a new user at the moment seems to be that the repository at "http://repo1.maven.org/eclipse" does no longer exist, and that "http://repo1.maven.org/maven2" does not have the necessary versions of the Eclipse JARs. For example uimaj-ep-configurator depends on "org.eclipse.core:org.eclipse.core.variables:jar" in version "3.1.100" but only the version "3.2.400.v20100505" is available (http://search.maven.org/#search%7Cga%7C1%7Corg.eclipse.core.variables). I'll work around this blocker by setting up a global mirror to our Artifactory in Darmstadt which still has the necessary artifacts in its cache.
9) I remove the ~/.m2/repository, set up a global mirror in the settings.xml accessing our Artifactory and repeat the steps 5-8.
Now (after step 9) I have mostly the same experience as you, Marshal: there are two errors, one in "uimaj-core" and one in "uimaj-tools", both due to UimaVersion missing.
* Marshal: 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.
10) I run "Maven->Update project configuration".
Now there are no build errors anymore.
This is the end of Marshal's story.
I would like to point out, that there are errors in the Maven console though, e.g. the one I had previously reported:
07.08.11 14:25:09 MESZ: Maven Builder: FULL_BUILD requireFullBuild
07.08.11 14:25:09 MESZ: [INFO] Unpacking /Users/bluefire/UKP/Workspaces/uima-experiment/uimaj-root/jVinci/target/classes to
/Users/bluefire/UKP/Workspaces/uima-experiment/uimaj-root/uimaj-ep-runtime/target/classes
with includes null and excludes:null
07.08.11 14:25:09 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/uima-experiment/uimaj-root/jVinci/target/classes to: /Users/bluefire/UKP/Workspaces/uima-experiment/uimaj-root/uimaj-ep-runtime/target/classes
org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
I get this error in the Maven Console view whenever I do a "Project Clean/Rebuild" in Eclipse on the uimaj-ep-runtime plugin. Try it and you'll get it as well.
=== II) Running the CAS Editor ===
Now comes the part where I want to run the uimaj-ep-cas-editor project as an Eclipse application.
Step 11 (see below) does not work yet because the option "Run As->Eclipse application" is not available. I had expected this, because m2eclipse did not generate the PDE nature into the uimaj-ep-* projects. This also explains why there are no plugin errors even though are no MANIFEST.MF files in the uimaj-ep-* projects yet. There are two ways of fixing this:
a) manually adding the PDE nature to the projects
b) running "mvn eclipse:eclipse"
c) installing the M2Eclipse OSGi development support, a.k.a "m2eclipse-tycho" from http://m2eclipse.sonatype.org/sites/m2e-extras
I chose c) because I don't like the way that "eclipse:eclipse" configures the workspace.
10a) I installed "Tycho Project Configurators" from http://m2eclipse.sonatype.org/sites/m2e-extras - 0.4.3.20101103-1630
10b) I run "Maven->Update project configuration". After the dust settles, there are interestingly still no errors in the workspace.
Interestingly there are still no errors now, even though there are no MANIFEST.MF files yet.
Now to step 11.
11) I right-click on the uimaj-ep-cas-editor project and select "Run As->Eclipse application".
12) Create a new project "test"
13) Create a folder "text"
14) Create a text file "test1.txt" in that folder with the content "This is a test."
15) Use "Import->UIMA Cas Editor/Document" to import the text file...
Uh! There is no "UIMA Cas Editor" section in the imports. The CAS Editor isn't there either. Looks like the bundles could not be resolved.
I open the run configuration "Eclipse Application" that was created in step 11
I select "Launch with: plug-ins selected below only"
I select all of the plugins using the "Select All" button
I select "Validate Plug-ins" and get a number of problems like "Missing Constraint: Import-Package: org.apache.uima...."
That's reasonable, because there are no MANIFEST.MF files yet. To generate them, I have to run at least some "mvn process-classes". I choose to run the full "mvn clean install" without tests and without docbook as mentioned in one of my last mails.
10c) Right-click on the "uimaj" 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".
Interestingly there are still no errors now, even though the MANIFEST.MF contain errors, but more on that later.
Now back to step 15.
15) Use "Import->UIMA Cas Editor/Document" to import the text file and select "test/text" as the target folder
16) Use "New->UIMA..." to create a type system descriptor so that we can open the XMI file
Ah, wait! We only ran the UIMA CAS Editor plugin. The Type System Editor Plugin is not part of that setup. Closing the CAS Editor Eclipse application to create a new run configuration that also includes the UIMA Tooling.
10d) Remove the "runtime-EclipseApplication" workspace
10e) Open the run configuration "Eclipse Application" that was created in step 11
10f) select "Launch with: plug-ins selected below only"
10g) select all of the plugins using the "Select All" button
10h) select "run"
Now back to step 16)
16) Use "New->UIMA..." to create a type system descriptor so that we can open the XMI file
Its still now there. OSGi says that the bundle is installed, but it is not resolved:
org.apache.uima.desceditor (2.3.2.SNAPSHOT) "UIMA Eclipse: uimaj-ep-configurator: Descriptor Editor" [Installed]
When I try to start it from the OSGi host console, I get:
The bundle "org.apache.uima.desceditor_2.3.2.SNAPSHOT [258]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.uima.jcas.jcasgenp; version="2.3.0"
Looking at the MANIFEST.MF of uimaj-ep-configurator I find several odd things:
- there are imports for a version 2.3 while it should be 2.3.2-SNAPSHOT (the exports are correct btw.!)
- even packages from uimaj-ep-configurator are imported in version 2.3
That is the end of my story so far, because I currently can't figure out at the moment, why the MANIFEST.MF files are broken.
BLOCKER: As a last measure, I tried running a "mvn clean install" after removing my ~/.m2/repository on a completely fresh checkout of UIMA. But this also generates the broken package imports in the MANIFEST.MF. A JAR I had downloaded from Jenkins with the build timestamp 20110606-1443 still contains the correct import statements.
=== III) Resume ===
I managed to get a workspace without build errors using Marshal's procedure described in section I).
I managed to run the CAS Editor after installing the M2Eclipse OSGi development support (Tycho Project Configurators) and running mvn clean install (without tests and docbook) to generate the MANIFEST.MF files.
I could identify two real blockers that need to be addressed:
- Core dependencies of the UIMA Eclipse tooling seem to no longer available on repo1, probably due to restructuring happening lately on Maven Central.
- Import-Package entries in the MANIFEST.MF files are generated with broken versions (2.3 instead of 2.3.2-SNAPSHOT).
The UIMA SDK build on Apache Jenkins is failed on 22.07.2011 13:01:25 and did not run since then. I would have liked to download a build from there to see if the Import-Package entries are correct there.
Currently it seems not to be possible to checkout and run UIMA Tooling Eclipse plugins or the CAS Editor without running "mvn clean install" or at least "mvn process-classes" at some point.
It seems as running "mvn clean install" would also be necessary whenever changes at the UIMA core framework are done, so that the changes are picked up and repackaged into uimaj-ep-runtime. This is due to the fact that the "unpackDependentJars" mojo of uimaj-ep-runtime produces an error when running as part of an incremental m2eclipse build. It might be worth to consider adding OSGi metadata to the core UIMA modules (uimaj-core, uimaj-tools, etc.) and obsolete the uimaj-ep-runtime module and the "unpackDependentJars" mojo in this way. It would also be good to have an integration test running as part of the build to see at least if the Eclipse plugins all install and resolve properly.
-- Richard
--
-------------------------------------------------------------------
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab
FB 20 Computer Science Department
Technische Universität Darmstadt
Hochschulstr. 10, D-64289 Darmstadt, Germany
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckartde-8gU7mq+ap6zbA/***@public.gmane.org
www.ukp.tu-darmstadt.de
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
-------------------------------------------------------------------