You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mike Perham <Mi...@webifysolutions.com> on 2005/11/04 22:14:17 UTC

Dependent artifacts and EARs

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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Dependent artifacts and EARs

Posted by Jesse McConnell <je...@gmail.com>.
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 <br...@apache.org> 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: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


--
jesse mcconnell
jesseDOTmcconnellATgmailDOTcom

Re: Dependent artifacts and EARs

Posted by Brett Porter <br...@apache.org>.
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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org