maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian (JIRA)" <>
Subject [jira] Updated: (MWAR-125) war manifest generation : optional=true not transitive
Date Tue, 16 Oct 2007 08:22:53 GMT


Adrian updated MWAR-125:


Here's a test case :

      <parent project>
     <ear file including test-web web module, test-service jar utility and test-service
jars dependencies>
    <utility jar bundled in ear file (not in WEB-INF/lib>
    <the interesting module>

test-web declares a dependency towards test-service with scope=compile and optional=true.
test-web declares a dependency towards commons-logging with scope=compile and optional=false.
test-web declares a dependency towards spring with scope=compile and optional=false.

When executing 'mvn package', we see that spring jar is bundled in WEB-INF/lib.
Since it's include from a transitive optional dependency (test-service) we should expect it
*not* to be bundled in WEB-INF/lib.

> war manifest generation : optional=true not transitive
> ------------------------------------------------------
>                 Key: MWAR-125
>                 URL:
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>            Reporter: Adrian
>         Attachments:
> From,
war  plugins distinguished the jars going to ear file and those going to WEB-INF/lib.
> For a jar that's deployed on the ear and not in WEB-INF/ilb, you jus have to put scope=compile
and optional=true:
>     <dependency>
>       <groupId></groupId>
>       <artifactId>bar-jar1</artifactId>
>       <version>${pom.version}</version>
>       <optional>true</optional>
>       <!-- goes in manifest classpath, but not included in WEB-INF/lib -->
>     </dependency>
> The problem is transitive dependencies of bar-jar1 are put in WEB-INF/lib.
> For instance :
> 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.
> I'll attach a test case ASAP.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message