Unfortunately this has the side effect of requiring the user to generate
the manifest.mf by hand since m2 cannot discriminate between truly
provided dependencies like j2ee.jar and dependencies marked as provided
just to exclude them from the war.  I would prefer to see a solution
which allows for automated maintenance of this file as it is mostly just
a subset of the info in the POM.

I also have the need that all dependent jars should go in EAR_ROOT/lib
in order to work with our IDE of choice, Rational Software Architect.
Listing 60 jars in the EAR POM and overriding their default location is
not a scalable solution - I would like to see the EAR plugin add an
option for the default location for all module dependencies.

mike

-----Original Message-----
From: Jesse McConnell [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 05, 2005 8:57 AM
To: Maven Developers List
Subject: Re: Dependent artifacts and EARs

I think I managed to do what you are shooting for with the existing
plugins..

reference the dependencies required by the war as
<scope>provided</scope> and then in the ear change all of the
dependencies to <scope>compile</scope> or <scope>runtime</scope> and you
should end up with empty wars files and a whole lot of dependencies in
the ear..

my final ear is pretty trim without the dependencies included in the war
files...or am I missing some other requirement of yours...

jesse

On 11/4/05, Brett Porter <[EMAIL PROTECTED]> wrote:
>
> This is an interesting problem.
>
> The reason you don't get the WAR's dependencies is because they are 
> not transitive because they are included in the WAR.
>
> Is it possible to pull them fomr WEB-INF/lib? I assume you need to 
> remove them from there anyway.
>
> The other alternative is to create a new packaging (something better 
> than skinny-war :), which is transitive and doesn't include them when 
> packaged.
>
> - Brett
>
>
>
> Mike Perham wrote:
> > Given an Artifact, how to I get its set of dependent artifacts?
> >
> > I'm trying to modify the EAR plugin to support "skinny" WARs i.e. 
> > WARs which have nothing in WEB-INF/lib but rather reference JARs 
> > packaged in their parent EAR. In other to do this, I need to be able

> > to get the dependencies for each module. I can call 
> > project.getArtifacts() but that only returns my WARs. How do I get 
> > the runtime dependencies for each of those WARs so I can copy those
into the EAR?
> >
> > mike
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For 
> > additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] For 
> additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
jesse mcconnell
jesseDOTmcconnellATgmailDOTcom


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

Reply via email to