You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by captainslow <sr...@gmail.com> on 2014/10/03 16:46:35 UTC
WAR contains SNAPSHOT JARs with timestamps
I have this project setup which uses Webstart and I need to bundle the WAR
with SNAPSHOT JARs. When the JARs are bundled into the WAR, they are
appended with a timestamp instead of the actual name.
Expected - ABC-1.0-SNAPSHOT.jar
Actual - ABC-1.0-20141002.211448-2.jar
The JAR in the remote repository (Artifactory) and local M2 repo is showing
up as ABC-1.0-SNAPSHOT.jar.
Env:
OS: Unix
Maven: 3.2.1
JDK: 1.7
Any thoughts on what needs to be done to get it to bundle with just the
name?
--
View this message in context: http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by Hilton Wichwski Silva <hw...@gmail.com>.
Why you canĀ“t use timestamped (SNAPSHOT) jars?
Anyway, maybe this can help you
http://stackoverflow.com/questions/1243574/how-to-stop-maven-artifactory-from-keeping-snapshots-with-timestamps
2014-10-08 0:21 GMT-03:00 captainslow <sr...@gmail.com>:
> I tried adding the following, but couldn't get it to work. Timestamp was
> appended to the SNAPSHOT jars.
>
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.4</version>
> <configuration>
>
> <outputFileNameMapping>@{artifactId}@-@{baseVersion}@.@{extension}@
> </outputFileNameMapping>
> </configuration>
> </plugin>
> {/code}
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5808036.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by captainslow <sr...@gmail.com>.
I tried adding the following, but couldn't get it to work. Timestamp was
appended to the SNAPSHOT jars.
{code}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<outputFileNameMapping>@{artifactId}@-@{baseVersion}@.@{extension}@</outputFileNameMapping>
</configuration>
</plugin>
{/code}
--
View this message in context: http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5808036.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by Stephen Connolly <st...@gmail.com>.
http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html
and strip the version if it is really important to you...
On 6 October 2014 15:38, captainslow <sr...@gmail.com> wrote:
> Also tried <useUniqueVersions>false</useUniqueVersions> in the manifest of
> the jars & war. It still appends version to the SNAPSHOT jars located
> inside
> the WAR.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5807865.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by captainslow <sr...@gmail.com>.
Also tried <useUniqueVersions>false</useUniqueVersions> in the manifest of
the jars & war. It still appends version to the SNAPSHOT jars located inside
the WAR.
--
View this message in context: http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5807865.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by captainslow <sr...@gmail.com>.
Hi,
Thank you for your response.
I did try the following but still see timestamp in the SNAPSHOT jars.
mvn clean deploy -DuseUniqueVersions=false
Here is my webstart plugin definition.
{code}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<version>1.0-beta-6</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>jnlp-download-servlet</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectoryName>.</outputDirectoryName>
<excludeTransitive>true</excludeTransitive>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<implementation-build>${buildNumber}</implementation-build>
<Trusted-Library>true</Trusted-Library>
<Permissions>all-permissions</Permissions>
</manifestEntries>
</archive>
<jnlpFiles>
...
</jnlpFiles>
</configuration>
</plugin>
{code}
Not sure what I am missing here.
thanks
--
View this message in context: http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5807858.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: WAR contains SNAPSHOT JARs with timestamps
Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
Hello,
I would argue this is a feature not a bug. (And this is also the
version name which IS stored in the repo).
Anyway, the WAR plugin uses the archiver shared component and that
allows to specify a custom classpath pattern, which should work to
remove the version component:
http://maven.apache.org/shared/maven-archiver/examples/classpath.html#aContents
If you want to only keep the -SNAPSHOT, then you can use
useUniqueVersions=false
Gruss
Bernd
Am Fri, 3 Oct 2014 07:46:35 -0700 (PDT)
schrieb captainslow <sr...@gmail.com>:
> I have this project setup which uses Webstart and I need to bundle
> the WAR with SNAPSHOT JARs. When the JARs are bundled into the WAR,
> they are appended with a timestamp instead of the actual name.
>
> Expected - ABC-1.0-SNAPSHOT.jar
> Actual - ABC-1.0-20141002.211448-2.jar
>
> The JAR in the remote repository (Artifactory) and local M2 repo is
> showing up as ABC-1.0-SNAPSHOT.jar.
>
> Env:
>
> OS: Unix
> Maven: 3.2.1
> JDK: 1.7
>
> Any thoughts on what needs to be done to get it to bundle with just
> the name?
>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org