maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Gonzalez <adr_gonza...@yahoo.fr>
Subject RE : Re: RE : war plugin: using optional=true
Date Mon, 15 Oct 2007 20:28:17 GMT
Thanks Wayne, 

created as MWAR-125
(http://jira.codehaus.org/browse/MWAR-125).

I'll attach asap a test case and will try to find a
fix tomorrow (I hope !).

In the meantime can someone who's generating ear
application with war and utility jar (used by war but
deployed at the root ear), tell me how it does it.

Are you creating manually MANIFEST.MF file and
populating WEB-INF/lib dependencies manually ? If not
how do you distinguish jars in ear from those in
WEB-INF/lib ? (I've also tries putting scope=provided
in wab module for jar going to ear and scope=compile
for WEB-INF/lib, but doesn't work since provided scope
is not transitive - see
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html).

Thanks very much for your help !

--- Wayne Fay <waynefay@gmail.com> a écrit :

> Sounds reasonable. Please file a bug in JIRA,
> ideally with a test and fix. ;-)
> 
> Wayne
> 
> On 10/15/07, Adrian Gonzalez <adr_gonzalez@yahoo.fr>
> wrote:
> > Hello,
> >
> > I'm currently looking at maven source code.
> >
> > In org.apache.maven.plugin.war.AbstractWarMojo
> > (v2.0.2), line 582, the .jar is copied in
> WEB-INF/lib
> > if !artifact.isOptional().. [1]
> >
> > I think that optionality is not inherited by
> > transitivity and that's the cause of my problem :
> > i.e. if artA declares
> >     <dependency>
> >       <artifactId>artB</artifactId>
> >       <optional>true</optional>
> >     </dependency>
> > and artB declares :
> >     <dependency>
> >       <artifactId>artC</artifactId>
> >       <optional>false</optional>
> >     </dependency>
> > then artC is transitively included in artA
> > dependencies  but with optional=false. IMHO it
> should
> > be included with optional=true since artB is
> optional.
> >
> > Could someone please confirm me ?
> >
> > [1] ScopeArtifactFilter filter = new
> > ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
> > if ( !artifact.isOptional() && filter.include(
> > artifact ) ) {
> >   ...
> >   //copy action...
> >
> >
> > --- Adrian Gonzalez <adr_gonzalez@yahoo.fr> a
> écrit :
> >
> > > I'm trying to build a ear structure containing
> war
> > > and
> > > jar files.
> > >
> > > I'm using maven-war-plugin instructions from
> > >
> >
>
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html
> > > (last part of this page) to create MANIFEST.MF.
> > >
> > > Using :
> > >     <dependency>
> > >       <groupId>org.foo</groupId>
> > >       <artifactId>bar-jar1</artifactId>
> > >       <version>${pom.version}</version>
> > >       <optional>true</optional>
> > >       <!-- goes in manifest classpath, but not
> > > included in WEB-INF/lib -->
> > >     </dependency>
> > >
> > > works fine for bar-jar1, but if bar-jar1 has
> > > dependencies, those dependencies are copied to
> > > WEB-INF/lib.
> > > I would expect those dependencies to be
> registered
> > > in
> > > the MANIFEST.MF (they are !), but not to be
> included
> > > in Web-Inf/lib.
> > >
> > > Is it a bug ? Thanks for the help, I'm really
> > > struggling with this ear building thing...
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________________
> > > Découvrez le blog Yahoo! Mail : dernières
> > > nouveautés, astuces, conseils.. et vos réactions
> !
> > > http://blog.mail.yahoo.fr
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > >
> > >
> >
> >
> >
> >     
>
____________________________________________________________________________________________
> > Découvrez le blog Yahoo! Mail : dernières
> nouveautés, astuces, conseils.. et vos réactions !
> > http://blog.mail.yahoo.fr
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
> 
> 



      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

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


Mime
View raw message