|
[
Permlink
| « Hide
]
Mark J. Titorenko added a comment - 08/Feb/06 08:42 AM
This issue really comes into play when using the assembly plugin as the assembly plugin bundles the jar in the artifactID-X.X-YYYYMMDD-HHmmss-V.jar form.
yep, the manifest should contain the actual file name (ie, timestamped)
Woops, I've attached the comments to bug
Never mind, they are related. Request for advice sent to dev list, see http://www.nabble.com/MJAR-28-Advice-from-dev%3A-Mainfest.mf-Class-Path-entries-by-MavenArchiver%2C-Assembly-and-Jar-tf1908862.html Baerrach, have you been able to make any progress on this?
Did you get an answer to your questions regarding the best way to fix this? We're suffering the same problem and would like to find a fix :/ http://jira.codehaus.org/browse/MNG-775 Most of the comments I have made have been against
MNG-775 doesn't affect this because:
so the only time this problem occurrs is when the artifact is deployed but not yet released. My current work around is to manually rename the assembled artifacts to -SNAPSHOT. The notes in I'm looking into test cases now and should know more by the end of the week. This patch includes the changes needed to support MNG-2456 and an update of the documentation to include reference to user specified classpath inclusions.
It also includes a cleanup of the unit tests, moving of the unit test data from src/test/resources into src/test/unit-test-data as this was causing the build to fail by trying to compile incomplete classes in src/test/resources. Plus a cleanup of JarSignVerifyMojo to remove Eclipse problem markers In
The solution here is to use an outputFileNameMapping such as this: ${artifactId}-${baseVersion}.${extension} (This issue can be closed) I do not agree that this issue should be closed.
It is true that outputFileNameMapping provides a workaround, but it is only a workaround, not a true fix. I am investigating how to make the jar plugin add the actual timestamped name to the classpath. The patch I provided does just that, for SNAPSHOTS it uses the timestamped version instead of -SNAPSHOT.
Baerrach: Do you mean
Sorry you are right.
The changes I needed to make for this are in maven-archiver in the linked issue MNG-2456 as the archiver does all the actual work, jar just invokes archiver. Perhaps this issue should be closed, then, if the problem is located entirely within maven-archiver, and the patch attached here does not relate to the problem described?
Maybe related to this issue: the manifest classpath generated by Maven ignores the "real" JAR name as specified in <finalName>>. For example the Geotools project tried the following configuration:
<build> <finalName>gt-${artifactId}-${version}</finalName> but the manifest classpath generated by Maven contains only ${artifactId}-${version}.jar entries, which are non-existent JARs. Note: this problem happen only when the JAR dependencis come from the repository. The manifest classpath is correct if all dependencies were compiled in the same "mvn install" cycle. Todd: The local workaround that I'm using consists of:
1) Check out maven-archiver-2.2 This is adequate when using maven-assembly-plugin 2.1. maven-assembly-plugin 2.2-beta-1 has broken things again though. ( This issue may be related to the logic affected by
Updated to use latest Maven-Archiver (2.4-SNAPSHOT) which fixes this issue. See
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||