[ 
https://issues.apache.org/jira/browse/UIMA-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13552212#comment-13552212
 ] 

Richard Eckart de Castilho commented on UIMA-2560:
--------------------------------------------------

There is a nasty problem in uimaj-ep-runtime that possibly warrants a separate 
issue to be tracked in. I'll mention it here on account of having stumbled 
across it while activating the m2e metadata and not being sure how to proceed:

During the Maven build, the *unpack-dependencies* goal is invoked to extract 
the non-OSGi uimaj runtime artifacts (uimaj-core, uimaj-cpe, etc.) to 
target/classes.

When this step is activated in Eclipse via a configuration section for m2e, an 
error is produced. Due to m2e's workspace artifact resolution feature, the 
location of these runtime artifacts refers to folders, not to JAR files:

{noformat}
Error unpacking file: WORKSPACE/uimaj/uimaj-core/target/classes to: 
WORKSPACE/uimaj/uimaj-ep-runtime/target/classes
org.codehaus.plexus.archiver.ArchiverException: The source must not be a 
directory. 
(org.apache.maven.plugins:maven-dependency-plugin:2.3:unpack-dependencies:unpackDependentJars:process-sources)
{noformat}

For the build of the uimaj-ep-* modules to work, even in Eclipse, this copying 
of JARs seems to be mandatory, because the other projects import packages from 
the uimaj-ep-runtime module. I don't quite understand the interaction between 
the Maven and the PDE build/metadata here.

For example the *uimaj-ep-jcasgen* module:

uimaj-ep-jcasgen has a "compile" dependency on uimaj-tools in the POM and 
"provided" on several Eclipse artifacts. In the plugin.xml, it imports the 
"...uima.tools.jcasgen" package, several Eclipse packages and adds a plug-in 
dependency on the org.eclipse.core.runtime.

I doesn't seem to be the case that "compile" dependencies from the pom are 
embedded into OSGi artifacts, hence the import of the "...uima.tools.jcasgen" 
package. Then, why aren't all the dependencies in the pom marked as "provided"?

Are the dependencies on non-OSGi artifacts like uimaj-core a workaround to the 
*unpack-dependencies* goal not working a expected in an Eclipse build? The 
dependency on uimaj-ep-runtime is commented out, but it just says "don't depend 
on the runtime plugin", it doesn't explain why.

Although, everything appears to compile fine, I roughly remember having had 
problems with that in the past when trying to run/debug UIMA Eclipse plugins 
getting exceptions because uimaj-ep-runtime didn't contain any classes unless a 
command line Maven build was run on the whole uimaj project before. 

Did anybody try to fix the uimaj-ep-runtime build in Eclipse? It appears that 
using *Embed-Dependency* [1] to include the non-OSGi dependencies in the 
uimaj-ep-runtime would be a good approach. Looks like this should be compatible 
with m2e [2] (minus bugs in m2e).

[1] 
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29-Embeddingdependencies
[2] http://web.archiveorange.com/archive/v/sSAtK3rEfyzyIoZNsPxN


                
> Eclipse m2e complains about unmapped maven plugins
> --------------------------------------------------
>
>                 Key: UIMA-2560
>                 URL: https://issues.apache.org/jira/browse/UIMA-2560
>             Project: UIMA
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>    Affects Versions: parent-pom-4
>            Reporter: Richard Eckart de Castilho
>            Assignee: Richard Eckart de Castilho
>             Fix For: parent-pom-5
>
>
> Recent versions of Eclipse m2e complain about Maven plugins in the UIMA 
> master pom not being covered by m2e lifecycle plugins:
> * uima-build-helper-maven-plugin
> * maven-dependency-plugin
> Add m2e metadata to the master POM to handle these.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to