使用rpm -maven-plugin时,如何在名称中包含带空格的文件?

时间:2012-04-04 00:16:52

标签: maven rpm rpm-maven-plugin

我正在尝试打包包含其他项目部分的自己的项目。以下是我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在生成spec文件时引用文件名?看起来它实际上是rpmbuild,但是我并不完全确定。

1 个答案:

答案 0 :(得分:0)

http://jira.codehaus.org/browse/MRPM-102描述了插件无法正确处理文件名中的空格的问题。解析器将空间解释为文件之间的分隔符,并且构建失败。补丁已于2012年4月14日提交,最终以2.1版本的插件发布。不确定是否有夜间版本。

相关问题