我正在尝试建立一个maven项目。但是低于错误:
Caused by: org.apache.maven.plugin.MojoExecutionException: Result of /bin/sh -c "cd /Users/rokde/Documents/workspace/mfc/map-coder/coder-web/target/jnlpStandalone && /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/bin/jarsigner -keystore ../../******.jks -storepass ****** -keypass ****** -signedjar /Users/rokde/Documents/workspace/mfc/map-coder/coder-web/target/jnlpStandalone/coder-model-22.07-SNAPSHOT.jar -storetype jks /Users/rokde/Documents/workspace/mfc/map-coder/coder-web/target/jnlpStandalone/unprocessed_coder-model-22.07-SNAPSHOT.jar ******" execution is: '127'.
at org.apache.maven.plugin.jar.JarSignMojo.signJar(JarSignMojo.java:344)
at org.apache.maven.plugin.jar.JarSignMojo.execute(JarSignMojo.java:241)
at org.codehaus.mojo.webstart.AbstractBaseJnlpMojo.signJars(AbstractBaseJnlpMojo.java:733)
at org.codehaus.mojo.webstart.AbstractBaseJnlpMojo.signOrRenameJars(AbstractBaseJnlpMojo.java:609)
at org.codehaus.mojo.webstart.JnlpDownloadServletMojo.execute(JnlpDownloadServletMojo.java:139)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
我的env变量:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
export PATH=/Users/rokde/Downloads/apache-maven-3.3.9/bin:$PATH
答案 0 :(得分:2)
您的JAVA_HOME
似乎不正确:验证/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/bin/jarsigner
是否存在。 AFAIK它只存在于JDK而不是JRE中。