Hi Martin,
first can you create a project which reproduces the problem...otherwise
it's really hard to drill down the issue...
Furthermore have you defined the dependencies in your ear module which
should be skinnyfied...
Does you ear module contain other dependencies which could have the jars
you don't like to have in your ear as a transitive dependency?
Can you post your pom file ?
On 11/26/14 3:31 PM, Martin Hoeller wrote:
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.
That sound really strange cause maven-ear-plugin itself does not
download artifacts...but we should try to drill down the problem...
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.
Hm...you say on one side it's a bug of maven-ear-plugin but here you say
different... ?...
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
Kind regards
Karl Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]