You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rahul Mishra <ze...@gmail.com> on 2015/01/22 22:36:29 UTC

Issue with Maven WAR Plugin?

Hi,

I am an encountering an issue when trying to create a WAR. When i am using
the Maven WAR plugin to create a WAR, different versions of the same JAR
are being included. For example, if i put an explicit dependency on A.jar
version 1.0.1

My WAR includes

A-1.0.1.jar
A-1.0.2.jar
A-1.0.2-SNAPSHOT-{buildTimeStamp}.jar

The extra inclusions don't make any sense. I checked through the dependency
plugin on the WAR's pom (to investigate if something was being pulled in
transitively) and the dependency tree is exactly as expected. . A similar
problem is described @

http://stackoverflow.com/questions/8082488/maven-war-packaging-creating-multiple-version-of-the-same-snapshot-jars-in-web-i

The suggestions listed at the link above have not helped me. I have even
tried excluding transitive dependencies explicitly and that has not helped
either(weird huh?).

*My environment*
Maven - 3.2.3 (Tried with 2,2,1 as well - same bug)
Maven War Plugin - Tried from 2.0 to 2.6

Has anybody else encountered this kind of an issue? Any pointers?

Regards,
Rahul

Re: Issue with Maven WAR Plugin?

Posted by Vincent Latombe <vi...@gmail.com>.
Do you have overlays? One of your overlays may embed a different version
that doesn't appear in the dependency tree, but yet it is there.

Vincent

2015-01-25 6:42 GMT+01:00 Dan Tran <da...@gmail.com>:

> It does not sound right.  Do you have a mini maven project to produce this?
>
> Thanks
>
> -D
>
> On Thu, Jan 22, 2015 at 1:36 PM, Rahul Mishra <ze...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am an encountering an issue when trying to create a WAR. When i am
> using
> > the Maven WAR plugin to create a WAR, different versions of the same JAR
> > are being included. For example, if i put an explicit dependency on A.jar
> > version 1.0.1
> >
> > My WAR includes
> >
> > A-1.0.1.jar
> > A-1.0.2.jar
> > A-1.0.2-SNAPSHOT-{buildTimeStamp}.jar
> >
> > The extra inclusions don't make any sense. I checked through the
> dependency
> > plugin on the WAR's pom (to investigate if something was being pulled in
> > transitively) and the dependency tree is exactly as expected. . A similar
> > problem is described @
> >
> >
> >
> http://stackoverflow.com/questions/8082488/maven-war-packaging-creating-multiple-version-of-the-same-snapshot-jars-in-web-i
> >
> > The suggestions listed at the link above have not helped me. I have even
> > tried excluding transitive dependencies explicitly and that has not
> helped
> > either(weird huh?).
> >
> > *My environment*
> > Maven - 3.2.3 (Tried with 2,2,1 as well - same bug)
> > Maven War Plugin - Tried from 2.0 to 2.6
> >
> > Has anybody else encountered this kind of an issue? Any pointers?
> >
> > Regards,
> > Rahul
> >
>

Re: Issue with Maven WAR Plugin?

Posted by Dan Tran <da...@gmail.com>.
It does not sound right.  Do you have a mini maven project to produce this?

Thanks

-D

On Thu, Jan 22, 2015 at 1:36 PM, Rahul Mishra <ze...@gmail.com>
wrote:

> Hi,
>
> I am an encountering an issue when trying to create a WAR. When i am using
> the Maven WAR plugin to create a WAR, different versions of the same JAR
> are being included. For example, if i put an explicit dependency on A.jar
> version 1.0.1
>
> My WAR includes
>
> A-1.0.1.jar
> A-1.0.2.jar
> A-1.0.2-SNAPSHOT-{buildTimeStamp}.jar
>
> The extra inclusions don't make any sense. I checked through the dependency
> plugin on the WAR's pom (to investigate if something was being pulled in
> transitively) and the dependency tree is exactly as expected. . A similar
> problem is described @
>
>
> http://stackoverflow.com/questions/8082488/maven-war-packaging-creating-multiple-version-of-the-same-snapshot-jars-in-web-i
>
> The suggestions listed at the link above have not helped me. I have even
> tried excluding transitive dependencies explicitly and that has not helped
> either(weird huh?).
>
> *My environment*
> Maven - 3.2.3 (Tried with 2,2,1 as well - same bug)
> Maven War Plugin - Tried from 2.0 to 2.6
>
> Has anybody else encountered this kind of an issue? Any pointers?
>
> Regards,
> Rahul
>

Re: Issue with Maven WAR Plugin?

Posted by Ron Wheeler <rw...@artifact-software.com>.
Of you are using an IDE with Maven support, you should be able to see 
the source of each dependency(ECLIPSE/STS includes m2e which has a 
Dependency hierarchy display.

There is probably a command line option that lists all of the transitive 
dependencies that should tell you where the jars are coming from.

Ron

On 22/01/2015 4:36 PM, Rahul Mishra wrote:
> Hi,
>
> I am an encountering an issue when trying to create a WAR. When i am using
> the Maven WAR plugin to create a WAR, different versions of the same JAR
> are being included. For example, if i put an explicit dependency on A.jar
> version 1.0.1
>
> My WAR includes
>
> A-1.0.1.jar
> A-1.0.2.jar
> A-1.0.2-SNAPSHOT-{buildTimeStamp}.jar
>
> The extra inclusions don't make any sense. I checked through the dependency
> plugin on the WAR's pom (to investigate if something was being pulled in
> transitively) and the dependency tree is exactly as expected. . A similar
> problem is described @
>
> http://stackoverflow.com/questions/8082488/maven-war-packaging-creating-multiple-version-of-the-same-snapshot-jars-in-web-i
>
> The suggestions listed at the link above have not helped me. I have even
> tried excluding transitive dependencies explicitly and that has not helped
> either(weird huh?).
>
> *My environment*
> Maven - 3.2.3 (Tried with 2,2,1 as well - same bug)
> Maven War Plugin - Tried from 2.0 to 2.6
>
> Has anybody else encountered this kind of an issue? Any pointers?
>
> Regards,
> Rahul
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org