How do I include files with spaces in their names when using rpm-maven-plugin?

Go To


I am trying to package my own project that includes parts of other projects. Here is a snippet from my pom.xml:


However, when I try to build an rpm, it errors out with a message similar to the following (repeated a couple of times):

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

Naturally, there is a file in the other project called Apache Software Licence v2.0.txt

Is there a way to tell maven to quote the filenames when generating the spec file? It looks like it is actually rpmbuild that is barfing, but I'm not completely sure.

2012-04-04 00:16
by MikeD
Does that mean you use a file outside of your current maven project? Furthermore usually the file is called LICENSE.txt which contains the license information - khmarbaise 2012-04-04 08:35
Yes, I am taking another project and copying it to my src/main/resources/contrib folder. The other project is not a maven project, so I can't just include it as a dependency. And I do not control what the file is called - I understand that it is usually just 'license' but in this case the project maintainers decided to make it 'Apache Software License - MikeD 2012-04-05 21:02 seems like it could be related - user944849 2012-04-06 03:28
@user944849 Yep, that's exactly it. If you turn that comment into an answer (and write up some knowledge around it), then I'll happily accept it. Guess I have to wait for 2.1 release - MikeD 2012-04-09 20:42

0 describes an issue where the plugin doesn't handle spaces in filenames correctly. The parser interprets the space as a delimiter between files and the build fails. Patch was submitted, accepted on 14 Apr 2012, for eventually release with version 2.1 of the plugin. Not sure if a nightly build is available.

2012-04-27 01:19
by user944849