我有一个maven多模块项目。在一个模块中,我们使用maven-assembly-plugin创建了2个ZIP文件。此配置为:Maven发布:使用程序集插件执行错误(多模块项目)
<configuration>
<finalName>${sample.source.zip.filename}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${project.build.directory}/zip</outputDirectory>
<descriptors>
<descriptor>src/main/assembly/sample-source.xml</descriptor>
</descriptors>
</configuration>
at the war packaging, we put this 2 zip files into the war files, with the maven-war-plugin
...
<resource>
<directory>${project.build.directory}/zip</directory>
<targetPath>client</targetPath>
</resource>
... </code></pre>
这是可以的。但在安装阶段,maven将这些压缩文件“复制”到本地存储库中的相同文件名! (module_name & version_number & .zip)我不知道,为什么它重命名tha zip文件!? (在战争中需要zip文件,但不是在存储库中的单个文件中。)但是,如果maven想复制它到那里,这对我来说可以,但为什么是重命名?
有任何想法吗?有没有什么办法在安装时排除文件?这是一个非常大的问题,因为在部署maven想要将具有相同名称的zip文件上传到maven存储库,但在第二个副本失败。 (因为有一个同名的zip文件....)
谢谢!完美的答案。 attach = false解决了我的问题。 –