Maven釋出出錯:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
阿新 • • 發佈:2021-02-04
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>