- 將本地jar包打包到本地的maven倉庫中的命令:
mvn install:install-file -DgroupId=tebie.applib.api -DartifactId=apiclient -Dversion=1.0-SNAPSHOT -Dfile=本地jar路徑 -Dpackaging=jar
說明:
DgroupId = pom中的<groupId></groupId>
DartifactId= pom中的<artifactId></artifactId>
Dversion= pom中的<version></version>
將本地jar包打包到本地的maven倉庫中的命令:文章來源:http://www.zghlxwxcb.cn/news/detail-687537.html
- 將本地jar包打包至maven私有倉庫中的命令:
mvn deploy:deploy-file -Dmaven.test.skip=true -Dfile=本地jar路徑 -DgroupId=tebie.applib.api -DartifactId=apiclient -Dversion=1.0-SNAPSHOT -Dpackaging=jar -DrepositoryId=releases -Durl=私有倉庫地址
說明:
DgroupId = pom中的<groupId></groupId>
DartifactId = pom中的<artifactId></artifactId>
Dversion = pom中的<version></version>
DrepositoryId = 本地maven配置文件setting.xml中的server.id,如下:
這里DrepositoryId 配置錯誤的話回報401的授權(quán)錯誤。
Durl = maven hosted類型的倉庫地址
這里地址配置錯誤可能會報400 Bad Request
我這里選擇第三個才打上去,這里可以切換這幾個hosted的地址進行嘗試。文章來源地址http://www.zghlxwxcb.cn/news/detail-687537.html
到了這里,關(guān)于將本地jar打包到本地maven倉庫或maven私服倉庫中的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!