maven 2 war packaging - adds unwanted jars in WEB-INF/lib

2008-01-24 Thread Jeudy, Guillaume
Hi all,

 

I get a list of jars that are added to my war without me specifying it
anywhere in my pom.xml as a dependency. Is it because of the dependency
transitivity feature ?

 

My pom.xml uses: packagingwar/packaging

some jars are added in WEB-INF/lib inside the war file even though they
are not listed anywhere in dependencies: 

 

here are some of them:


[DEBUG] adding entry ant-1.6.5.jar

[DEBUG] adding entry ant-junit-1.6.5.jar

[DEBUG] adding entry ant-launcher-1.6.5.jar

[DEBUG] adding entry antlr-2.7.5.jar

[DEBUG] adding entry asm-2.2.jar

I could manually exclude them using
warSourceExcludesfilelist/warSourceExcludes in the war plugin config
but I'd rather understand what is causing this ? I'm using Maven 2.0.8.

 

Thanks,

-Guillaume Jeudy




This electronic mail (including any attachments) may contain information that 
is privileged, confidential, and/or otherwise protected from disclosure to 
anyone other than its intended recipient(s). Any dissemination or use of this 
electronic email or its contents (including any attachments) by persons other 
than the intended recipient(s) is strictly prohibited. If you have received 
this message in error, please notify us immediately by reply email so that we 
may correct our internal records. Please then delete the original message 
(including any attachments) in its entirety. Thank you.


Re: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

2008-01-24 Thread Wayne Fay
This is most likely due to transitive dependencies, as you thought.
But it sounds a little bit odd as Ant artifacts are mostly used during
the build process and not as dependencies.

You can use mvn -X package and then search for ant-launcher to see
what dependency is bringing it into the build.

If you can't figure it out, post your pom.xml and the mvn -X output at
pastebin.org or similar and send links. Someone can take a look and
try to help you figure it out.

Wayne

On 1/24/08, Jeudy, Guillaume [EMAIL PROTECTED] wrote:
 Hi all,



 I get a list of jars that are added to my war without me specifying it
 anywhere in my pom.xml as a dependency. Is it because of the dependency
 transitivity feature ?



 My pom.xml uses: packagingwar/packaging

 some jars are added in WEB-INF/lib inside the war file even though they
 are not listed anywhere in dependencies:



 here are some of them:


 [DEBUG] adding entry ant-1.6.5.jar

 [DEBUG] adding entry ant-junit-1.6.5.jar

 [DEBUG] adding entry ant-launcher-1.6.5.jar

 [DEBUG] adding entry antlr-2.7.5.jar

 [DEBUG] adding entry asm-2.2.jar

 I could manually exclude them using
 warSourceExcludesfilelist/warSourceExcludes in the war plugin config
 but I'd rather understand what is causing this ? I'm using Maven 2.0.8.



 Thanks,

 -Guillaume Jeudy



 
 This electronic mail (including any attachments) may contain information that 
 is privileged, confidential, and/or otherwise protected from disclosure to 
 anyone other than its intended recipient(s). Any dissemination or use of this 
 electronic email or its contents (including any attachments) by persons other 
 than the intended recipient(s) is strictly prohibited. If you have received 
 this message in error, please notify us immediately by reply email so that we 
 may correct our internal records. Please then delete the original message 
 (including any attachments) in its entirety. Thank you.


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



RE: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

2008-01-24 Thread Jeudy, Guillaume
Hi all,

 

It turns out it was an issue with transitive dependency. I changed the
scope of compile only for an artifact which caused all the other jars to
stop being included in the war distribution WEB-INF/lib.

 

Now I have an issue with package an EAR in a different pom file which
uses packagingear/packaging. I get a list of 75 jars, I changed the
scope of all dependencies in this pom file to compile and I still get
all the jars as part of the ear distribution. What could be wrong ?

 

Thanks,

-Guillaume Jeudy 

 



From: Jeudy, Guillaume 
Sent: January 24, 2008 4:49 PM
To: 'users@maven.apache.org'
Subject: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

 

Hi all,

 

I get a list of jars that are added to my war without me specifying it
anywhere in my pom.xml as a dependency. Is it because of the dependency
transitivity feature ?

 

My pom.xml uses: packagingwar/packaging

some jars are added in WEB-INF/lib inside the war file even though they
are not listed anywhere in dependencies: 

 

here are some of them:


[DEBUG] adding entry ant-1.6.5.jar

[DEBUG] adding entry ant-junit-1.6.5.jar

[DEBUG] adding entry ant-launcher-1.6.5.jar

[DEBUG] adding entry antlr-2.7.5.jar

[DEBUG] adding entry asm-2.2.jar

I could manually exclude them using
warSourceExcludesfilelist/warSourceExcludes in the war plugin config
but I'd rather understand what is causing this ? I'm using Maven 2.0.8.

 

Thanks,

-Guillaume Jeudy




This electronic mail (including any attachments) may contain information that 
is privileged, confidential, and/or otherwise protected from disclosure to 
anyone other than its intended recipient(s). Any dissemination or use of this 
electronic email or its contents (including any attachments) by persons other 
than the intended recipient(s) is strictly prohibited. If you have received 
this message in error, please notify us immediately by reply email so that we 
may correct our internal records. Please then delete the original message 
(including any attachments) in its entirety. Thank you.


RE: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

2008-01-24 Thread Jeudy, Guillaume
Hi all,

 

I can't figure out what is causing all these jars to appear in my EAR
file. I posted the mvn -X package output to this link
http://pastebin.org/16873. 

 

The contents of the pom file can be viewed at this link:

http://pastebin.org/16875

 

I'm guessing because maven is unable to get the pom file of the
dependency it applies some default transitive dependency unfortunately
adding all these jars to my EAR file. Is there anyway to shortcircuit
this behavior ? I know many of these jars are either not on maven2
repository or don't have a corresponding pom file.

 

Any help greatly appreciated,

 

Thanks,

-Guillaume

 



From: Jeudy, Guillaume 
Sent: January 24, 2008 5:26 PM
To: Jeudy, Guillaume; 'users@maven.apache.org'
Subject: RE: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

 

Hi all,

 

It turns out it was an issue with transitive dependency. I changed the
scope of compile only for an artifact which caused all the other jars to
stop being included in the war distribution WEB-INF/lib.

 

Now I have an issue with package an EAR in a different pom file which
uses packagingear/packaging. I get a list of 75 jars, I changed the
scope of all dependencies in this pom file to compile and I still get
all the jars as part of the ear distribution. What could be wrong ?

 

Thanks,

-Guillaume Jeudy 

 



From: Jeudy, Guillaume 
Sent: January 24, 2008 4:49 PM
To: 'users@maven.apache.org'
Subject: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

 

Hi all,

 

I get a list of jars that are added to my war without me specifying it
anywhere in my pom.xml as a dependency. Is it because of the dependency
transitivity feature ?

 

My pom.xml uses: packagingwar/packaging

some jars are added in WEB-INF/lib inside the war file even though they
are not listed anywhere in dependencies: 

 

here are some of them:


[DEBUG] adding entry ant-1.6.5.jar

[DEBUG] adding entry ant-junit-1.6.5.jar

[DEBUG] adding entry ant-launcher-1.6.5.jar

[DEBUG] adding entry antlr-2.7.5.jar

[DEBUG] adding entry asm-2.2.jar

I could manually exclude them using
warSourceExcludesfilelist/warSourceExcludes in the war plugin config
but I'd rather understand what is causing this ? I'm using Maven 2.0.8.

 

Thanks,

-Guillaume Jeudy




This electronic mail (including any attachments) may contain information that 
is privileged, confidential, and/or otherwise protected from disclosure to 
anyone other than its intended recipient(s). Any dissemination or use of this 
electronic email or its contents (including any attachments) by persons other 
than the intended recipient(s) is strictly prohibited. If you have received 
this message in error, please notify us immediately by reply email so that we 
may correct our internal records. Please then delete the original message 
(including any attachments) in its entirety. Thank you.


Re: maven 2 war packaging - adds unwanted jars in WEB-INF/lib

2008-01-24 Thread Michael McCallum
use

mvn dependency:resolve 

to see the list of dependencies and their scopes... 
you can add -X to see the resolution process

On Fri, 25 Jan 2008 11:02:36 Wayne Fay wrote:
 This is most likely due to transitive dependencies, as you thought.
 But it sounds a little bit odd as Ant artifacts are mostly used during
 the build process and not as dependencies.

 You can use mvn -X package and then search for ant-launcher to see
 what dependency is bringing it into the build.

 If you can't figure it out, post your pom.xml and the mvn -X output at
 pastebin.org or similar and send links. Someone can take a look and
 try to help you figure it out.

 Wayne

 On 1/24/08, Jeudy, Guillaume [EMAIL PROTECTED] wrote:
  Hi all,
 
 
 
  I get a list of jars that are added to my war without me specifying it
  anywhere in my pom.xml as a dependency. Is it because of the dependency
  transitivity feature ?
 
 
 
  My pom.xml uses: packagingwar/packaging
 
  some jars are added in WEB-INF/lib inside the war file even though they
  are not listed anywhere in dependencies:
 
 
 
  here are some of them:
 
 
  [DEBUG] adding entry ant-1.6.5.jar
 
  [DEBUG] adding entry ant-junit-1.6.5.jar
 
  [DEBUG] adding entry ant-launcher-1.6.5.jar
 
  [DEBUG] adding entry antlr-2.7.5.jar
 
  [DEBUG] adding entry asm-2.2.jar
 
  I could manually exclude them using
  warSourceExcludesfilelist/warSourceExcludes in the war plugin config
  but I'd rather understand what is causing this ? I'm using Maven 2.0.8.
 
 
 
  Thanks,
 
  -Guillaume Jeudy
 
 
 
  _
 ___ This electronic mail (including any
  attachments) may contain information that is privileged, confidential,
  and/or otherwise protected from disclosure to anyone other than its
  intended recipient(s). Any dissemination or use of this electronic email
  or its contents (including any attachments) by persons other than the
  intended recipient(s) is strictly prohibited. If you have received this
  message in error, please notify us immediately by reply email so that we
  may correct our internal records. Please then delete the original message
  (including any attachments) in its entirety. Thank you.

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



-- 
Michael McCallum
Enterprise Engineer
mailto:[EMAIL PROTECTED]

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