maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <>
Subject Re: Why is ear:generate-application-xml used by eclipse:eclipse?
Date Fri, 10 Jul 2009 00:49:15 GMT
On Fri, Jul 10, 2009 at 6:19 AM, J. den Boer<> wrote:
> I'm trying to find the problem why no Eclipse project files can be generated
> of an Ear project without installing the required dependencies first.
> I've seen that it's caused by the ear:generate-application-xml goal, but I
> don't understand why, how and where it's starten. I checkout out the sources
> of both the Eclipse and Ear plugin, created a custom ear plugin version
> where I removed all annotation from the ApplicationXmlMojo and installed it
> in the local repository.
> The test project, just a generated simple j2ee project, used this custom ear
> plugin. When running eclipse:eclipse still the ear:generate-application-xml
> goal is sought but this goal does not exist anymore.
> Anyone knows why it's still used? I cannot find anything in either the
> Eclipse or Ear plugin which references to it.

The eclipse plugin uses the standard lifecycles (see
But only runs up to "generate-resources" (via @execute
phase="generate-resources" in

Your ear project would have a package type of ear (via
<packaging>ear</packaging> in pom.xml)

If you look at the standard lifecycle for ear (Default Lifecycle
Bindings - Packaging ear) it uses the following phases with these
bound plugins

generate-resources 	ear:generateApplicationXml
process-resources 	resources:resources
package 	ear:ear
install 	install:install
deploy 	deploy:deploy

You can see from the ear plugin documentation for
ear:generateApplicationXml  that it requires dependency resolution of
artifacts in scope: test

If the ear's dependencies do not yet exist then they can not be resolved.
If they can not be resolved they can not be included in the
eclipse:eclipse output.

As Benjamin points out you need these built first.

Personally I would do the following.

mvn install
mvn eclipse:eclipse

That way all your dependencies have been built.

If you try
  mvn package eclipse:eclipse
it may not work as there have been bugs in the past where plugins do
not pickup artifacts built during the reactor build but instead rely
on the artifacts being in the local repository.

Hope this helps

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message