Hi!

I'm using the maven-ear-plugin to create an EAR with a skinny WAR. This
worked fine till I did an update from version 2.9 to version 2.9.1.

The actual problem is quite hard to explain, so I'll try and start with
an abstract and provide details below.

The problem is, the skinny WAR contains a lot more JARs than it should,
but not all that are in the original WAR artifact. So it seems the
m-ear-p does build a skinny WAR but the decisions what JARs to pack
into the WAR are wrong. Changing the used m-ear-p back to version 2.9
fixes the problem, so this is definitely a regression in v2.9.1.

The really strange thing is, this does not happen always! It only
happens when I build my project the first time a day and a
recent version of dependency of the project was not locally installed
but was obtained from our local nexus. So it seems version information
(or timestamps as all versions are SNAPSHOTs) of the dependencies
matters.

A concrete example to make this more clear:

* My Project E is the EAR.
* E depends on an artifact W, a WAR.
* E and W have a common dependency D which is also a project of mine.
* E, W and D are all built by a CI-server (jenkins) and SNAPSHOTs
  are deployed to nexus during the night.

In the WAR there is D.jar packaged in WEB-INF/lib.
In the EAR there is D.jar packaged in lib/ and the skinny WAR should no
longer contain D.jar.

With  m-ear-p 2.9 this worked as expected. With version 2.9.1 when I
build E with "mvn clean install" and D was not locally installed
earlier this day, the skinny WAR is not skinny. It contains D.jar!
Thus, D.jar is located twice in the EAR which is a bug.

As soon as I do a "mvn clean install" for D, the building of E
starts to work and the WAR is skinny again... till a nightly deploy
provides a newer SNAPSHOT of D.

Any ideas what could be wrong here?

I'd be happy to provide a sample project but I'm not sure how to
provide this as it also seems to depend on the infrastructure.

TIA,
- martin

PS: I reported a (maybe) related issue half a year ago without any
    feedback. Not sure if this could provide some extra info:
    
http://maven.40175.n5.nabble.com/bug-in-maven-ear-plugin-with-skinny-war-td5792646.html

Attachment: signature.asc
Description: PGP signature

Reply via email to