Maven:如何使用没有时间戳文件名的快照构件创建程序集? [英] Maven: How to create assembly with snapshot artifacts without timestamps file name?
问题描述
我有一个存储库,其中包含带有时间戳记的快照工件.
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.
我已经使用了这个 dependencySet :
<outputFileNameMapping>${artifact.artifactId}-${artifact.version}.${artifact.extension}</outputFileNameMapping>
但是版本接缝已经包含了时间戳.那么有没有机会获得 1.1.1-SNAPSHOT 而不是 1.1.1-20100323.071348-182 ?
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?
我正在使用maven-assembly-plugin的2.2-beta-4版本.
I'm using version 2.2-beta-4 of maven-assembly-plugin.
推荐答案
您能否为outputFileNameMapping
尝试以下操作:
Could you try the following for the outputFileNameMapping
:
${artifactId}-${baseVersion}.${extension}
根据诸如 MASSEMBLY-67 ,
在要保留-SNAPSHOT命名的情况下使用 Using 更新:在获得OP的反馈后,确切的语法是(不确定): Update: After feedback from the OP, the exact syntax is (wasn't totally sure of this): 这篇关于Maven:如何使用没有时间戳文件名的快照构件创建程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!${baseVersion}
,该插件保留使用${version}
进行时间戳-内部版本号命名的功能,这对于描述程序集中包含的确切库版本很有用.
${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.${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}