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

maven異常記錄java

執行 Maven install 時報錯:apache

 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]maven

 

以下:ui

 

[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/MojoFailureExceptiondebug

 

緣由: 使用的版本是maven3.X,其執行maven-ant-plugin的行爲和maven2.x有必定的不一樣,須要引入pluginManagementorm

 

 

解決辦法是:在pom.xml中引入:xml

 

以前的內容:get

 

 

 

<build>
   <plugins>it

      <plugin></plugin>io

      ...

       <plugin></plugin>

    </plugins>

</build>

 

 

修改後的內容:

 

 

 

 

<build>

   <pluginManagement>

   <plugins>

      <plugin></plugin>

      ...

       <plugin></plugin>

    </plugins>

</pluginManagement></build>

相關文章
相關標籤/搜索