我正在尝试从maven插件构建rpm并在下面获取错误: 无法签署RPM:RPM符号执行返回:' 127' POM文件看起来很好,因为它能够生成war文件 我该如何签署rpm?
附加日志以供参考:
[INFO] Building target platforms: noarch-redhat-linux
[INFO] Building for target noarch-redhat-linux
[INFO] Processing files: point-my_web_client-3-2.0.2.noarch
[INFO] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/buildroot
[INFO] Wrote: /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/RPMS/noarch/point-my_web_client-3-2.0.2.noarch.rpm
[INFO] Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.IMhciz
[WARNING] + umask 022
[WARNING] + cd /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/BUILD
[WARNING] + /bin/rm -rf /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/buildroot
[WARNING] + exit 0
[DEBUG] About to execute '/bin/sh -c cd /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/RPMS/noarch && expect -'
[WARNING] /bin/sh: expect: command not found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.453 s
[INFO] Finished at: 2016-07-31T18:26:32+05:30
[INFO] Final Memory: 42M/176M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:**rpm-maven-plugin:2.0.1:rpm** (default-cli) on project my_web_client:
Unable to sign RPM: RPM sign execution returned: '127' executing '/bin/sh -c cd /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/RPMS/noarch && expect -' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.0.1:rpm (default-cli) on project my_web_client: Unable to sign RPM
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to sign RPM
at org.codehaus.mojo.rpm.RPMHelper.buildPackage(RPMHelper.java:170)
at org.codehaus.mojo.rpm.AbstractRPMMojo.execute(AbstractRPMMojo.java:736)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
**Caused by: java.lang.IllegalStateException: RPM sign execution returned: '127'** executing '/bin/sh -c cd /home/my_project/server/my_module/my_web_client/target/rpm/point-my_web_client/RPMS/noarch && expect -'
at org.codehaus.mojo.rpm.RPMSigner.sign(RPMSigner.java:109)
at org.codehaus.mojo.rpm.RPMHelper.buildPackage(RPMHelper.java:166)
... 23 more
答案 0 :(得分:0)
问题似乎在于:
[WARNING] /bin/sh: expect: command not found
127
是为"命令找不到的代码"
我想尝试安装expect命令,或将其添加到路径中。