Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
From http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html, 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>org.foo</groupId>
<artifactId>bar-jar1</artifactId>
<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.
Issue Links
- duplicates
-
MWAR-111
Transitive dependencies of optional dependencies are included in WEB-INF/lib
-