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