私のsettings.xmlファイルは 'u01/jenkins/.m2 /'にあります。これは、Nexusの導入のために設定する必要がある場所ですか? (すべてのユーザーに対してグローバルに使用できる)のMavenがインストールされているフォルダまたは$HOME/.m2/settings.xml
でジェンキンスジョブを実行しているユーザーのホームフォルダのいずれかで行くべき「リターンコードは、401、ReasonPhrase:Unauthorized」というエラーが表示されます。ゲンキンを通して成果物をネクサスにデプロイしようとしたとき
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project jenktest: Failed to deploy artifacts: Could not transfer artifact tulsa.jenkins.test:jenktest:pom:0.0.1-20170905.090435-1 from/to snapshots (http://myhost:8081/nexus/content/repositories/snapshots): Failed to transfer file: http://myhost:8081/nexus/content/repositories/snapshots/tulsa/jenkins/test/jenktest/0.0.1-SNAPSHOT/jenktest-0.0.1-20170905.090435-1.pom. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project jenktest: Failed to deploy artifacts: Could not transfer artifact tulsa.jenkins.test:jenktest:pom:0.0.1-20170905.090435-1 from/to snapshots (http://204.26.165.206:8081/nexus/content/repositories/snapshots): Failed to transfer file: http://myhost:8081/nexus/content/repositories/snapshots/tulsa/jenkins/test/jenktest/0.0.1-SNAPSHOT/jenktest-0.0.1-20170905.090435-1.pom. Return code is: 401, ReasonPhrase: Unauthorized.
私はジェンキンスジョブフォルダ内のsettings.xmlファイルを参照してくださいと私は不正アクセスエラーが直面しているイムthogh、展開権限を持つリポジトリとユーザーとのsettings.xmlファイルを構成したのですか?考えられる理由は何ですか?ありがとう –
settings.xmlは、あなたのjenkinsジョブフォルダに置くべきではありません。 '/ home/[JENKINS_USERNAME] /。m2/settings.xml'になければなりません。 –