When launching a Maven mojo goal from M2E via Run as... Maven build..., the
mojo goal implementation receives an injected MavenProject instance
representing the main project, and gets the test (or compile) classpath
elements.

This list of classpath elements contains all the resolved dependency JARs
from the local ~/.m2/repository directory.

However, when one of those dependencies is also imported into the same
Eclipse workspace, we were anticipating that the classpath element for this
dependency would no longer point at the dependency JAR in the local
~/.m2/repository directory, but instead point to the target/classes
directory of the dependent project present in the workspace.  This approach
seems to make sense, as it follows the same model as compile classpath
managed via the Maven classpath container in the Eclipse build path.

Without this behavior, we need to perform the manual step of mvn install on
the dependent project before launching the Maven mojo goal on the main
project so that the mojo goal implementation can see the latest for the
dependency from the dependency project's installed JAR.

Q1. Is it possible to cause "mvn install" to be part of Eclipse's "Build
automatically" for the dependent project?
Q2. Does it make sense to M2E folks for the injected MavenProject to point
directly to target/classes for dependency projects imported to the same
Eclipse workspace?  If so, we are interested to help get this working.

Kind Regards,
John Fallows


-- 

*John Fallows*
CTO*  |  *Phone: +1.650.960.8148  |  Mobile: +1.415.215.6597
*----------------------------------------------------------------------*
KAAZING >|<
Event-Driven Communication. Fast. Secure. Mobile. Guaranteed.
Kaazing.com <http://www.kaazing.com/>  |  Download
<http://kaazing.com/download.html>  |  Blog <http://blog.kaazing.com/>  |
Twitter <https://twitter.com/kaazing>
_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to