Hi all,

I'm using the maven-eclipse-plugin to create the project meta files like 
.project or .classpath for eclipse. Basically, the intention of the 
maven-eclipse-plugin was not to use the default dependency resolution, instead 
the maven-eclipse-plugin uses its own dependency resolution. Especially in a 
multi module project the dependency resolution for sub modules (often available 
only in source) shouldn't force an error on source module not build yet. 
However, works fine until the packaging is type "ear". 

The reason seems to be the phase binding of the eclipse-mojo, see annotations 
in source code of the plugin:
...
* @goal eclipse
* @execute phase="generate-resources"
...
In case of packaging type "ear" maven detects the maven-ear-plugin is required 
because bound to the default build life cycle too. Seems to be that Maven 
executes the demanded default dependency resolution by maven-ear-plugin, see 
again the related annotations in source code of the maven-ear-plugin:
...
* @requiresDependencyResolution test
...
However, the maven-ear-plugin interferes the eclipse plugin before its own 
execution. Of course the maven-ear-plugin detects the missing artifacts for all 
the (source) sub module not build yet and the execution fails.

Is there any chance to solve this with any plugin configuration or is there any 
other way to solve this issue? My first idea was to "unbind" the 
maven-eclipse-plugin from the default life cycle, but how can I reach this 
goal? 
Anyway, if the default life cycle cannot be overridden, it would be nice to 
omit the default phase binding for maven-eclipse-plugin in future releases and 
define it explicity in plugin configuration if really needed.

Cheers,
Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to