If your code depends on activation, then you want to list it.
What if mail changes their dependencies, you would not have it in your
compile.
If you import it, you need to specify it.
You don't want your IDE looking through the whole dependency tree to
resolve each import.
Maven is running the right way now.
Ron
On 30/08/2010 5:30 AM, Ognjen Blagojevic wrote:
On 24.8.2010 23:41, skatz wrote:
Is there a way to, when building a war, have a jar and all its
dependencies
be part of the compile time path, but not be included in the war file
itself, without having to list each one in the pom.xml?
That is the way Maven should behave by default.
For instance, if you define javax.mail in pom.xml:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.2</version>
<scope>provided</scope>
</dependency>
mvn dependency:tree shows also transitive depndecy javax.activation:
[INFO] +- javax.mail:mail:jar:1.4.2:provided (scope not updated to
compile)
[INFO] | \- javax.activation:activation:jar:1.1:provided
Which will be available at compile time, and not packed inside WAR.
Regards,
Ognjen
---------------------------------------------------------------------
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]