码迷,mamicode.com
首页 > Web开发 > 详细

Maven install 报错: Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-art

时间:2017-09-23 19:04:22      阅读:1917      评论:0      收藏:0      [点我收藏+]

标签:trace   inf   解决   install   内容   enc   stack   执行   build   

执行 Maven install 时报错:

 Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-artifacts)on project openstack-java-sdk: Cannot obtain passphrase in batchmode -> [Help 1]

 

如下:

 

[INFO] BUILD FAILURE
[INFO]------------------------------------------------------------------------
[INFO] Total time: 0.970s
[INFO] Finished at: Tue Mar 04 14:06:04 CST 2014
[INFO] Final Memory: 7M/87M
[INFO]------------------------------------------------------------------------
[ERROR] Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-artifacts)on project openstack-java-sdk: Cannot obtain passphrase in batchmode -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Mavenwith the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debuglogging.
[ERROR]
[ERROR] For more information about the errors and possiblesolutions, please read the following articles:
[ERROR] [Help 1]http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

 

原因: 使用的版本是maven3.X,其执行maven-ant-plugin的行为和maven2.x有一定的不同,需要引入pluginManagement

 

 

解决办法是:在pom.xml中引入:

 

之前的内容:

 

 

 

<build>
   <plugins>

      <plugin></plugin>

      ...

       <plugin></plugin>

    </plugins>

</build>

 

 

修改后的内容:

 

 

 

 

<build>

   <pluginManagement>

   <plugins>

      <plugin></plugin>

      ...

       <plugin></plugin>

    </plugins>

</pluginManagement>
</build>

Maven install 报错: Failed to execute goalorg.apache.maven.plugins:maven-gpg-plugin:1.4:sign (sign-art

标签:trace   inf   解决   install   内容   enc   stack   执行   build   

原文地址:http://www.cnblogs.com/sandea/p/7581663.html

(2)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!