Ok I have thrown together all my notes that I was using while investigating this.
I have also included a patch that has integration test cases that show the desired behaviour. I wouldn't be applying those patches to the SCM, just use them locally.
The error occurs in MavenArchiver at the lines 82-108 in the config.isAddClasspath block.
The problem is that the classpath is configured from
project.getRuntimeClasspathElements()
and appended to the classpath by converting the artifact to a file and use the name part of the file.
For SNAPSHOT files, these will ALWAYS resolve to -SNAPSHOT, even though it is a duplicate copy of the timestamped version.
So it looks like MavenArchiver should be using an algorithm similar to Assembly for creating the Class-Path entry. (The code should be refactored so it can be shared)
However, I could only find MavenArchiver from maven/components/tags/maven-2.0.4
Does that mean to fix this we have to go to Maven 2.0.5?
This issue is cloned from
MASSEMBLY-3MASSEMBLY-3