maven部署構建到私服

    1.配置上傳的用戶名以及密碼web

maven的setting.xml中有一個servers節點,查看這個節點的註釋,servers是身份驗證配置信息的集合,能夠用來鏈接遠程的服務器。具體查看setting.xml的英文說明。shell

參考配置:服務器

setting.xmlmaven

<server>
	<id>pingancloud_thirdparty</id>
	<username>deployment</username>
	<password>deployment</password>
</server>

   

    2.須要上傳的構建POM.xml添加url

<distributionManagement>
	<repository>
		<id>pingancloud_thirdparty</id>
		<name>Local Nexus Repository for thirdparty</name>
		<url>http://10.20.23.176/nexus/content/repositories/thirdparty/</url>
	</repository>
</distributionManagement>

Distribution information for a project that enables deployment of  the site and artifacts to remote web servers and repositories  respectively.code


3.執行 mvn 命令orm

mvn deploy -e


4.顯示結果server

Uploading: http://10.20.23.176/nexus/content/repositories/thirdparty/com/pingan/xml

adapter/maven-metadata.xmlrem

Uploaded: http://10.20.23.176/nexus/content/repositories/thirdparty/com/pingan/a

dapter/maven-metadata.xml (328 B at 1.2 KB/sec)

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 7.280s

[INFO] Finished at: Tue Mar 29 16:59:37 CST 2016

[INFO] Final Memory: 5M/15M

[INFO] ------------------------------------------------------------------------

相關文章
相關標籤/搜索