【发布时间】:2011-10-20 12:38:18
【问题描述】:
我有一个 Maven 多模块项目。在一个模块中,我们使用 maven-assembly-plugin 创建了 2 个 ZIP 文件。这个配置:
<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 将这些 zip 文件以相同的文件名“复制”到本地存储库中!!! (module_name & version_number &.zip) 而且我不知道,为什么它重命名 tha zip 文件!? (战争中需要的zip文件,而不是存储库中的单个文件。)但是如果maven想将其复制到那里,对我来说没问题,但是为什么要重命名???
有人知道吗?有没有办法在安装时排除文件?这是一个非常大的问题,因为在部署时,maven 想将同名的 zip 文件上传到 maven 存储库,但在第二次复制时它失败了。 (因为有一个同名的zip文件....)
【问题讨论】:
标签: java maven build maven-release-plugin