Hi, 

In Maven 2.0.8 I  built my war with maven-war-plugin:2.1-alpha-1 and my 
zip with maven-assembly-plugin:2.2-beta-2

The war/zip contained dependent jars as "jarname-version-SNAPSHOT.jar" 
when the depend jars were located in the localrepository.
The war/zip contained dependent jars as "jarname-version-timestamp.jar" 
when the depend jars were located in the central (company) repository and 
first need to be downloaded.

The difference was in the mavenmetadata-local.xml, where a 
"<localCopy>true</localCopy> entry exists:

 <?xml version="1.0" encoding="UTF-8" ?> 
 <metadata>
        ...
 <versioning>
 <snapshot>
  <localCopy>true</localCopy> 
  </snapshot>
...
  </versioning>
  </metadata>

Now, In Maven 2.0.9 I still built my war with maven-war-plugin:2.1-alpha-1 
and my zip with maven-assembly-plugin:2.2-beta-2

But now, the mavenmetadata-local.xml file doesn´t contain a 
"<localCopy>true</localCopy> entry anymore - even if I paste one, it gets 
deleted during the build !
This results in always getting wars/zips containing dependent jars as 
"jarname-version-timestamp.jar".

And that´s not very nice, because in the MANIFEST.MF of same jars the 
""jarname-version-SNAPSHOT.jar" is mentioned, which doesn´t match the 
content of the war/zip,
Resulting in "NoClassDefFoundError" and so on, caused by an invalid 
classpath....

The funny point about that story is that with the maven-ear-plugin  the 
jars appear as ""jarname-version-SNAPSHOT.jar" in the generated *.ear.

=> Any idea how to fix that for the war and zip? Why is there a difference 
in handling jars between the war, ear and assembly plugins? Isn´t it 
always the same?
 


Thanx, Torsten

Reply via email to