views:

336

answers:

1

I've a repository containing snapshot artifacts with timestamps.

I want to create an assembly, that contains the dependencies. This works fine. But the artifact names contains the timestamp. So i wonder how to remove the timestamp from filename for the assembly only.

I've used this dependencySet:

<outputFileNameMapping>${artifact.artifactId}-${artifact.version}.${artifact.extension}</outputFileNameMapping>

But version seams to contain already the timestamp. So is there any chance to get a 1.1.1-SNAPSHOT instead of 1.1.1-20100323.071348-182?

I'm using version 2.2-beta-4 of maven-assembly-plugin.

+1  A: 

Could you try the following for the outputFileNameMapping:

${artifactId}-${baseVersion}.${extension}

According to issues like MASSEMBLY-67, MASSEMBLY-91:

Using ${baseVersion} for cases where you want to preserve the -SNAPSHOT naming, the plugin retains the ability to use ${version} for the timestamp-buildnumber naming, which is useful for describing the exact library version included in the assembly.

Update: After feedback from the OP, the exact syntax is (wasn't totally sure of this):

${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
Pascal Thivent
Thanks a lot. Just a little change and it works fine: <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping>
marabol
@marabol You're welcome. Glad it works. I wasn't totally sure for the syntax of properties but I thought you would figure it out :)
Pascal Thivent