本解决方案转自:http://blog.csdn.net/tangximing123/article/details/21179467

执行 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>

最新文章

  1. Linux内核模块简介
  2. ios如何获取位置权限
  3. 避免url传值字符串sjstr过长,使用from表单【隐藏域】post提交
  4. 如何在github上展示作品——为你的项目生成一个快速访问的网址如(DaisyWang88.github.io)
  5. [转]剖析ASP.Net MVC Application
  6. 【HDOJ】4902 Nice boat
  7. SystemClock.sleep和Thread.sleep的区别
  8. 通过Java WebService接口从服务端下载文件
  9. 【Android应用开发】分享一个录制 Android 屏幕 gif 格式的小技巧
  10. qt delete
  11. 基于Flask 实现Web微信登陆
  12. java I/O工作机制
  13. 二进制补码除法——计算机底层整数除法模拟之Java实现
  14. redgate的mysql架构比较和数据比较工具
  15. centos6.8防火墙模块未加载
  16. 如何在js里引用php变量
  17. Gen类的字符串操作
  18. 002_docker构建zookeeper环境
  19. Js中split()方法的正确使用
  20. VBA 调用DLL动态链接库

热门文章

  1. tomcat7.0.27的bio,nio.apr高级运行模式(转)
  2. 在C#中判断某个类是否实现了某个接口
  3. android.intent.action.MAIN, android.intent.category.LAUNCHER
  4. 单节点k8s的一个小例子 webapp+mysql
  5. iOS中的#import和class区别
  6. Python学习笔记014——迭代器 Iterator
  7. Accounting_会计基础知识
  8. 标准I/O库
  9. 自己定义View学习之12/7(进度条之混合模式)
  10. 使用Spring boot开发RestFul 风格项目PUT/DELETE方法不起作用