我正在尝试打包我自己的项目,其中包括其他项目的一部分。这是我的一个片段pom.xml
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
...
<mappings>
...
<mapping>
<directory>${install.target}/contrib</directory>
<sources>
<source>
<location>src/main/resources</location>
<includes>
<include>contrib/**/*</include>
</includes>
</source>
</sources>
</mapping>
...
</mappings>
</plugin>
但是,当我尝试构建 rpm 时,它会出错并显示类似于以下的消息(重复几次):
error: Two files on one line: /install/path/contrib/project/licences/Apache
error: File must begin with "/": Software
error: Two files on one line: /install/path/contrib/project/licences/Apache
error: File must begin with "/": Licence
error: Two files on one line: /install/path/contrib/project/licences/Apache
error: File must begin with "/": v2.0.txt
自然地,在另一个项目中有一个文件叫做Apache Software Licence v2.0.txt
有没有办法告诉 maven 在生成规范文件时引用文件名?看起来实际上是 rpmbuild 令人讨厌,但我不完全确定。