maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenney Westerhof <>
Subject Re: Fw :[m2-beta-1] Ear plugin: root-context & copied JARs/WARs
Date Tue, 20 Sep 2005 13:39:22 GMT
On Tue, 20 Sep 2005 wrote:


> Nobody has an answer for these 2 little questions?

Sorry but I missed this one!

> For the second question, I've struggled with scopes, but it seems that
> because of the transitive dependencies feature, the Ear plugin packages
> every Jar set to compile/runtime in the pom of the War...

See below.

> Fabrice.
> ---------------------------------------------------------------------------------------------
> Hi guys!
> I've 2 little questions about the Ear plugin (version 2.0beta1):
> 1- how can I tell the Ear plugin to use a specific root-context for a War
> when it generates the application.xml? (instead of using the artifactId)
> Something like the "<ear.appxml.war.context-root>" in m1.

Use the plugin configuration. You can specify configuration options for
the modules:

      <uri>the_web_uri</uri> <!-- if needed.. -->

Maybe Stephane Nicoll can confirm if this is correct?

I personally use xdoclet and j2ee specific descriptor files within the
WEB-INF directory of the war itself, because you can specify the
location there too, and it'll work even if you deploy the war standalone.
On the other hand, for ears, it's best to use application.xml.

> 2- when the plugin generates the Ear, it packages most dependencies of the
> War module, while they already exist the the WEB-INF/lib of the War (and I
> don't want them to be copied a second time at the root of the Ear). Those
> dependencies have a "compile" scope in the pom of the War module. Is it the
> normal behaviour? Is there a property or something to tell m2 not to
> package them?

Well this is a bit of a problem.
You can specify the dependencies in the war pom with scope 'provided',
so they won't end up in the war.
This works great if you always use the war within an ear that also has
those dependencies, but if you use that war standalone it'll break.
Also, those war dependencies are not transferred to the ear project,
so you have to respecify them there.

> Thanks for your help!

Sorry we missed this!

-- Kenney

> Cheers,
> Fabrice.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Kenney Westerhof
GPG public key:

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

View raw message