Dear users and developers,
While I'm tidy up an multi-module project, I found strange an issue:
In the parent pom, I have an artifact defined with 'optional=true'
within the dependencyManagement:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream-version}</version>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
In a child module (module-a), I declare the dependency as follow
<dependencies>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
</dependencies>
If I run mvn help:effective-pom under the child module (module-a),
it shows me that, the dependency is NOT optional (optional tag is absence)
In another child module which depends on child module-a to build an ear,
it also pull the xstream package, just like the dependency is not optional.
Does 'optional' attribute supposed to be inherited by parent POM?
Thanks!
Best regards,
Zarick Lau
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]