-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
3.15
https://github.com/jenkinsci/jenkins/pull/3947/files#r408456990
Steps to reproduce:
Use the following ~/.m2/settings.xml:
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <profiles> <profile> <id>cert-snapshots</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>JENKINS-61937</id> <url>https://repo.jenkins-ci.org/JENKINS-61937/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> </repositories> </profile> </profiles> </settings>
The specified repository is configured to always return 401 or 403 for all resolutions due to referencing a repository no non-admin user has access to.
Result when building current matrix-auth-plugin with a patched 2.230 core dependency:
[INFO] --- maven-hpi-plugin:3.12:run (default-cli) @ matrix-auth --- [INFO] Logging initialized @7418ms to org.eclipse.jetty.util.log.Slf4jLog [INFO] Generating /Users/danielbeck/Repositories/github.com/daniel-beck/matrix-auth-plugin/work/plugins/matrix-auth.hpl Downloading from JENKINS-61937: https://repo.jenkins-ci.org/JENKINS-61937/com/sun/tools/1.8.0/tools-1.8.0.pom [WARNING] Error resolving project artifact: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized for project com.sun:tools:jar:1.8.0 [INFO] Copying dependency Jenkins plugin /Users/danielbeck/.m2/repository/org/jenkins-ci/plugins/structs/1.19/structs-1.19.hpi [INFO] Copying dependency Jenkins plugin /Users/danielbeck/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-multibranch/2.10/workflow-multibranch-2.10.hpi [INFO] Copying dependency Jenkins plugin /Users/danielbeck/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-job/2.7/workflow-job-2.7.hpi [INFO] Copying dependency Jenkins plugin /Users/danielbeck/.m2/repository/org/jenkins-ci/plugins/job-dsl/1.76/job-dsl-1.76.hpi [INFO] Copying dependency Jenkins plugin /Users/danielbeck/.m2/repository/org/jenkins-ci/plugins/branch-api/2.0.0/branch-api-2.0.0.hpi [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.945 s [INFO] Finished at: 2020-05-08T20:07:00+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.12:run (default-cli) on project matrix-auth: Unable to copy dependency plugin: Failed to open artifact com.sun:tools:jar:1.8.0:system at /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/../lib/tools.jar: org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Failure to transfer com.sun:tools:pom:1.8.0 from https://repo.jenkins-ci.org/JENKINS-61937/ was cached in the local repository, resolution will not be reattempted until the update interval of JENKINS-61937 has elapsed or updates are forced. Original error: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized for project com.sun:tools:jar:1.8.0 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.12:run (default-cli) on project matrix-auth: Unable to copy dependency plugin at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to copy dependency plugin at org.jenkinsci.maven.plugins.hpi.RunMojo.execute (RunMojo.java:374) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.io.IOException: Failed to open artifact com.sun:tools:jar:1.8.0:system at /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/../lib/tools.jar: org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Failure to transfer com.sun:tools:pom:1.8.0 from https://repo.jenkins-ci.org/JENKINS-61937/ was cached in the local repository, resolution will not be reattempted until the update interval of JENKINS-61937 has elapsed or updates are forced. Original error: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized for project com.sun:tools:jar:1.8.0 at org.jenkinsci.maven.plugins.hpi.MavenArtifact.getResolvedType (MavenArtifact.java:231) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.isPlugin (MavenArtifact.java:58) at org.jenkinsci.maven.plugins.hpi.RunMojo.execute (RunMojo.java:347) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Failure to transfer com.sun:tools:pom:1.8.0 from https://repo.jenkins-ci.org/JENKINS-61937/ was cached in the local repository, resolution will not be reattempted until the update interval of JENKINS-61937 has elapsed or updates are forced. Original error: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized for project com.sun:tools:jar:1.8.0 at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:330) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:236) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:251) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:258) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.resolvePom (MavenArtifact.java:51) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.getResolvedType (MavenArtifact.java:229) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.isPlugin (MavenArtifact.java:58) at org.jenkinsci.maven.plugins.hpi.RunMojo.execute (RunMojo.java:347) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer com.sun:tools:pom:1.8.0 from https://repo.jenkins-ci.org/JENKINS-61937/ was cached in the local repository, resolution will not be reattempted until the update interval of JENKINS-61937 has elapsed or updates are forced. Original error: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:424) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262) at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:318) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:236) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:251) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:258) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.resolvePom (MavenArtifact.java:51) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.getResolvedType (MavenArtifact.java:229) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.isPlugin (MavenArtifact.java:58) at org.jenkinsci.maven.plugins.hpi.RunMojo.execute (RunMojo.java:347) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer com.sun:tools:pom:1.8.0 from https://repo.jenkins-ci.org/JENKINS-61937/ was cached in the local repository, resolution will not be reattempted until the update interval of JENKINS-61937 has elapsed or updates are forced. Original error: Could not transfer artifact com.sun:tools:pom:1.8.0 from/to JENKINS-61937 (https://repo.jenkins-ci.org/JENKINS-61937/): Not authorized at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException (DefaultUpdateCheckManager.java:225) at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact (DefaultUpdateCheckManager.java:173) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads (DefaultArtifactResolver.java:559) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:483) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:401) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262) at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:318) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:236) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:251) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository (DefaultMavenProjectBuilder.java:258) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.resolvePom (MavenArtifact.java:51) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.getResolvedType (MavenArtifact.java:229) at org.jenkinsci.maven.plugins.hpi.MavenArtifact.isPlugin (MavenArtifact.java:58) at org.jenkinsci.maven.plugins.hpi.RunMojo.execute (RunMojo.java:347) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [ERROR] [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
- links to