2016-07-04 63 views
0

理論上,使用rpm-maven-plugin/alien安裝(它提供了rpmrpmbuild二進制文件),它應該相當容易。但我送花兒給人把它與一個神祕的錯誤而失敗(因爲某些宏也展開):使用Maven在Debian上構建RPM

$ mvn package 
... 
[INFO] --- rpm-maven-plugin:2.1.5:rpm (build-rpm) @ dist --- 
[WARNING] rpm version string truncated to 0.2.2 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/BUILD 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/RPMS 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SOURCES 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SPECS 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/SRPMS 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/tmp-buildroot 
[INFO] Creating directory /home/wikier/projects/foo/dist/target/rpm/foo/buildroot 
[INFO] Copying files to /home/wikier/projects/foo/dist/target/rpm/foo/SOURCES 
[INFO] Copying files to /home/wikier/projects/foo/dist/target/rpm/foo/tmp-buildroot/usr/share/foo-magic-api 
[INFO] Creating spec file /home/wikier/projects/foo/dist/target/rpm/foo/SPECS/foo.spec 
[INFO] error: Unknown icon type: Icon_foo.png 
[INFO] Building target platforms: x86-64-pc-linux 
[INFO] Building for target x86-64-pc-linux 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 7.578 s 
[INFO] Finished at: 2016-07-04T14:16:49+02:00 
[INFO] Final Memory: 42M/1237M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.5:rpm (build-rpm) on project dist: RPM build execution returned: '1' executing '/bin/sh -c cd '/home/wikier/projects/foo/dist/target/rpm/foo/SPECS' && 'rpmbuild' '-bb' '--target' 'x86-64-pc-linux' '--buildroot' '/home/wikier/projects/foo/dist/target/rpm/foo/buildroot' '--define' '_topdir /home/wikier/projects/foo/dist/target/rpm/foo' '--define' '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' '--define' '_builddir %{_topdir}/BUILD' '--define' '_rpmdir %{_topdir}/RPMS' '--define' '_sourcedir %{_topdir}/SOURCES' '--define' '_specdir %{_topdir}/SPECS' '--define' '_srcrpmdir %{_topdir}/SRPMS' 'foo.spec'' -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

任何人有類似的環境中的一些經驗?

+0

報告給https://github.com/mojohaus/rpm-maven-plugin/issues/58 此圖標警告會稍後打破構建。 – wikier

回答

0

Got it!日誌[INFO] error: Unknown icon type: Icon_foo.png實際上應該是ERROR,因爲稍後會導致調用rpmbuild的錯誤。