Looks like the assembly plugin uses somewhere artifact.getVersion() instead of 
artifact.getBaseVersion().

Please check if there's already such an issue at jira[1], otherwise create the 
issue yourself.

 

-Robert

 

[1] http://jira.codehaus.org/browse/MASSEMBLY

----------------------------------------
> Date: Thu, 11 Aug 2011 10:51:22 -0700
> From: [email protected]
> Subject: Discrepancy in SNAPSHOT jar filename between JAR Plugin and Assembly 
> Plugin
> To: [email protected]
>
> I am seeing an interesting discrepancy between the JAR plugin and the 
> Assembly plugin.
>
> I have the JAR plugin configured to add the dependencies to the MANIFEST:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <addClasspath>true</addClasspath>
> <classpathPrefix>lib</classpathPrefix>
> <mainClass>org.myapp.main.Main</mainClass>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> The JAR file name will be added to the MANIFEST like this. . .
>
> Class-Path: lib/my-commons-1.0.6-SNAPSHOT.jar [...etc]
>
> So far so good.
>
> Now, I have the Assembly plugin configured to add the dependencies to the 
> /lib directory of an archive:
>
>
> <assembly>
> ....
> <dependencySets>
> <dependencySet>
> <useProjectArtifact>false</useProjectArtifact>
> <outputDirectory>/lib</outputDirectory>
> <useDefaultExcludes>true</useDefaultExcludes>
> </dependencySet>
> </dependencySets>
> </assembly>
>
> When the Assembly plugin builds the archive, the name of the jarfile is NOT 
> my-commons-1.0.6-SNAPSHOT.jar! Instead what I get is 
> "my-commons-1.0.6-20110810.204640-23.jar"
>
>
> $ ll my-commons*
> -rwx------+ 1 mike Users Users 48805 Aug 11 08:53 
> my-commons-1.0.6-20110810.204640-23.jar
>
> Major Problem!!
>
> Anyone know why this is happening? I am using Maven 2.0.9 and I'm stuck with 
> this version and cannot change it!                                         
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to