Sounds reasonable. Please file a bug in JIRA, ideally with a test and fix. ;-)

Wayne

On 10/15/07, Adrian Gonzalez <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>      
> ____________________________________________________________________________________________
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to