[nexus3][maven]發佈jar

settings.xmlmaven

<server>
    	<id>maven-releases</id>
    	<username>admin</username>
    	<password>admin123</password>
    </server>

必須叫:maven-releases,與url一致。url

mvn deploy:deploy-file -Dfile=skyark-component-1.1.0-RELEASE.pom         -Dpackaging=pom -DgroupId=com.unicom.skyark.component -DartifactId=skyark-component -Dversion=1.1.0-RELEASE -Durl=http://130.51.23.250:8081/repository/maven-releases/ -DrepositoryId=maven-releases
mvn deploy:deploy-file -Dfile=skyark-component-1.1.0-RELEASE.jar         -Dpackaging=jar -DgroupId=com.unicom.skyark.component -DartifactId=skyark-component -Dversion=1.1.0-RELEASE -Durl=http://130.51.23.250:8081/repository/maven-releases/ -DrepositoryId=maven-releases
mvn deploy:deploy-file -Dfile=skyark-component-1.1.0-RELEASE-sources.jar -Dpackaging=jar -DgroupId=com.unicom.skyark.component -DartifactId=skyark-component -Dversion=1.1.0-RELEASE -Dclassifier=sources -Durl=http://130.51.23.250:8081/repository/maven-releases/ -DrepositoryId=maven-releases
  • 報錯Return code is: 401, ReasonPhrase: Unauthorized.,權限問題,好比maven-releases寫錯了
    • 顯示日誌:最後加-e
  • 上傳jar報錯:
    • skyark-component-1.1.0-RELEASE.pom. Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases. -> [Help 1]
    • 好像不影響的。
  • 必須先上傳pom!不能覆蓋的。能夠經過界面刪除pom文件。
  • 看jar包:http://130.51.23.250:8081/service/rest/repository/browse/maven-releases/com/unicom/skyark/component/
相關文章
相關標籤/搜索