我有一個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解決了我的問題。 –