1. 程式人生 > 其它 >Maven釋出出錯:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy

Maven釋出出錯:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy

技術標籤:DebugJava

Maven釋出jar包
在這裡插入圖片描述
報錯:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy

原因:缺少配置

解決:在Maven配置檔案settings.xml中加配置

在目錄…\apache-maven-3.2.3-bin\apache-maven-3.2.3\conf下開啟檔案settings.xml,增加配置。

<!-- servers
   | This is a list of authentication profiles, keyed by the server-id used within the system.
   | Authentication profiles can be used whenever maven must make a connection to a remote server.
   |-->
<servers> <!-- server | Specifies the authentication information to use when connecting to a particular server, identified by | a unique name within the system (referred to by the 'id' attribute below). | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are | used together. |-->
<server> <id>xxxx</id> <username>xxxx</username> <password>xxxx</password> </server> <!-- Another sample, using keys to authenticate. <server> <id>siteServer</id> <privateKey>/path/to/private/key</privateKey> <passphrase>optional; leave empty if not used.</passphrase> </server> -->
</servers>