`status code: 401, reason phrase: (401)` while manual release of Jenkins radargun-plugin

35 views
Skip to first unread message

Anna Manukyan

unread,
Sep 13, 2024, 4:28:11 PM9/13/24
to Jenkins Developers
Hi,

I am trying to perform a manual release of radargun-plugin for Jenkins (https://github.com/jenkinsci/radargun-plugin). 

I am running command: 
`mvn -s ~/.m2/settings.xml org.apache.maven.plugins:maven-release-plugin:2.5:prepare org.apache.maven.plugins:maven-release-plugin:2.5:perform -Pjenkins-release` 

where ~/.m2/settings.xml contains the correct settings for my credentials for Artifactory. 

The plugin is properly released in GitHub, but during upload to Artifactory, the command gives error (see logs below):

[INFO] --- deploy:3.1.1:deploy (default-deploy) @ radargun ---
[INFO] Uploading to repo.jenkins-ci.orghttps://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/radargun/1.23/radargun-1.23.pom
[INFO] Progress (1): 3.0 kB
[INFO]                    
[INFO] Uploading to repo.jenkins-ci.orghttps://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/radargun/1.23/radargun-1.23.hpi
[INFO] Uploading to repo.jenkins-ci.orghttps://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/radargun/1.23/radargun-1.23.jar
[INFO] Uploading to repo.jenkins-ci.orghttps://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/radargun/1.23/radargun-1.23-sources.jar
[INFO] Uploading to repo.jenkins-ci.orghttps://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/radargun/1.23/radargun-1.23-javadoc.jar
[INFO] Progress (1): 33/390 kB
[INFO] Progress (1): 66/390 kB
[INFO] Progress (1): 98/390 kB
[INFO] Progress (1): 131/390 kB
[INFO] Progress (1): 164/390 kB
[INFO] Progress (1): 197/390 kB
[INFO] Progress (1): 229/390 kB
[INFO] Progress (1): 262/390 kB
[INFO] Progress (1): 295/390 kB
[INFO] Progress (1): 328/390 kB
[INFO] Progress (1): 360/390 kB
[INFO] Progress (1): 390 kB    
[INFO] Progress (2): 390 kB | 33/749 kB
[INFO] Progress (3): 390 kB | 33/749 kB | 33/55 kB
[INFO] Progress (3): 390 kB | 66/749 kB | 33/55 kB
[INFO] Progress (4): 390 kB | 66/749 kB | 33/55 kB | 33/102 kB
[INFO] Progress (4): 390 kB | 66/749 kB | 55 kB | 33/102 kB  
[INFO] Progress (4): 390 kB | 98/749 kB | 55 kB | 33/102 kB
[INFO] Progress (4): 390 kB | 98/749 kB | 55 kB | 66/102 kB
[INFO] Progress (4): 390 kB | 98/749 kB | 55 kB | 98/102 kB
[INFO] Progress (4): 390 kB | 98/749 kB | 55 kB | 102 kB  
[INFO] Progress (4): 390 kB | 131/749 kB | 55 kB | 102 kB
[INFO] Progress (4): 390 kB | 164/749 kB | 55 kB | 102 kB
[INFO]                                                  
[INFO] Progress (1): 197/749 kB
[INFO] Progress (1): 229/749 kB
[INFO] Progress (1): 262/749 kB
[INFO] Progress (1): 295/749 kB
[INFO] Progress (1): 328/749 kB
[INFO] Progress (1): 360/749 kB
[INFO] Progress (1): 393/749 kB
[INFO] Progress (1): 426/749 kB
[INFO] Progress (1): 459/749 kB
[INFO] Progress (1): 492/749 kB
[INFO] Progress (1): 524/749 kB
[INFO] Progress (1): 557/749 kB
[INFO] Progress (1): 590/749 kB
[INFO] Progress (1): 623/749 kB
[INFO] Progress (1): 655/749 kB
[INFO] Progress (1): 688/749 kB
[INFO] Progress (1): 721/749 kB
[INFO] Progress (1): 749 kB    
[INFO]                    
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time:  19.561 s
[INFO] [INFO] Finished at: 2024-09-13T17:59:01+02:00
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy (default-deploy) on project radargun: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:radargun:pom:1.23 from/to repo.jenkins-ci.org (https://repo.jenkins-ci.org/releases): status code: 401, reason phrase:  (401) -> [Help 1]
[INFO] [ERROR]
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  28.543 s
[INFO] Finished at: 2024-09-13T17:59:01+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:perform (default-cli) on project radargun: Maven execution failed, exit code: '1' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException



I have tried to run simple `mvn deploy` and the command released and uploaded to Artifactory 1.23-SNAPSHOT release. So I assume that this means that credentials to Artifactory and uploading mechanism works well. But then why the release itself doesn't uploaded to Artifactory?

Thanks in advance.
Best regards,
Anna. 

Daniel Beck

unread,
Sep 13, 2024, 4:40:44 PM9/13/24
to jenkin...@googlegroups.com
On Fri, Sep 13, 2024 at 10:28 PM Anna Manukyan <anna....@gmail.com> wrote:
I have tried to run simple `mvn deploy` and the command released and uploaded to Artifactory 1.23-SNAPSHOT release. So I assume that this means that credentials to Artifactory and uploading mechanism works well. But then why the release itself doesn't uploaded to Artifactory?

Delete the "distributionManagement" section from your pom.xml. For historical reasons, the name of the repos for deploying is maven.jenkins-ci.org, to which you associated the credentials in your settings.xml, so defining a "repo.jenkins-ci.org" to deploy to will mean you're unauthenticated. Since the pom.xml doesn't also define "snapshotRepository", that's inherited, and has the correct ID.

Anna Manukyan

unread,
Sep 16, 2024, 7:12:14 AM9/16/24
to Jenkins Developers
Hi,
thanks a lot for your response.
I have removed the "distributionManagement" from pom.xml as you have suggested, but still I am getting the same error but now with the correct ID:

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy (default-deploy) on project radargun: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.plugins:radargun:pom:1.24 from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/releases/): status code: 401, reason phrase:  (401) -> [Help 1]

Best regards,
Anna.

Anna Manukyan

unread,
Sep 16, 2024, 7:12:14 AM9/16/24
to Jenkins Developers
Please ignore my last message (was using wrong settings.xml).
So the released proceeded after "distributionManagement" section removal.

Thanks again a lot for your support.
Anna
On Friday, September 13, 2024 at 10:40:44 PM UTC+2 db...@cloudbees.com wrote:
Reply all
Reply to author
Forward
0 new messages