1
我想打包自己的項目,其中包括其他項目的一部分。下面是我的pom.xml
片段:使用rpm-maven-plugin時,如何在名稱中包含空格的文件?
<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在生成spec文件時引用文件名?看起來實際上rpmbuild是barfing,但我並不完全確定。
這是否意味着您在當前maven項目之外使用文件?此外,通常該文件被稱爲LICENSE.txt,其中包含許可證信息。 – khmarbaise 2012-04-04 08:35:46
是的,我正在接受另一個項目並將其複製到我的src/main/resources/contrib文件夾中。另一個項目不是Maven項目,所以我不能將它作爲依賴包含在內。我不控制哪些文件名爲 - 我的理解,這通常只是「許可」,但在這種情況下,該項目的維護者決定把它「Apache軟件許可證」 – MikeD 2012-04-05 21:02:42
http://jira.codehaus.org/browse/ MRPM-102似乎是它可以扯上關係? – user944849 2012-04-06 03:28:04