1. 程式人生 > >Maven上傳jar包到私服

Maven上傳jar包到私服

new posit setting 用戶 lease release -1 str family

1、認證,在M2_HOME/conf/settings.xml配置用戶名密碼

技術分享

2、在將要上傳項目的pom.xml中配置jar包上傳路徑url

<distributionManagement>
    <repository>
        <id>releases</id>
        <url>http://127.0.0.1:8081/repository/maven-releases/</url>
    </repository>
    <snapshotRepository>
        <
id>releases</id> <url>http://127.0.0.1:8081/repository/maven-snapshots/</url> </snapshotRepository> </distributionManagement>

技術分享

3、執行命令發布項目到私服(上傳jar包到私服上)

  mvn deploy

技術分享

Maven上傳jar包到私服