Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61937

hpi:run fails on Java 8 when the plugin depends on 2.230+

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      3.15

      Description

      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
      

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Was a problem in my Maven settings.xml that caused lookup of dependencies to result in HTTP 403 Forbidden responses, which are treated differently from HTTP 404 (the expected case here).

            Show
            danielbeck Daniel Beck added a comment - Was a problem in my Maven settings.xml that caused lookup of dependencies to result in HTTP 403 Forbidden responses, which are treated differently from HTTP 404 (the expected case here).
            Hide
            jglick Jesse Glick added a comment -

            This clearly looks like a case of maven-hpi-plugin being insufficiently robust.

            Show
            jglick Jesse Glick added a comment - This clearly looks like a case of maven-hpi-plugin being insufficiently robust.
            Hide
            danielbeck Daniel Beck added a comment -

            Tentative fix idea, WDYT?

            $ git diff
            diff --git a/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java b/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java
            index e5b4c0c..bffa23e 100644
            --- a/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java
            +++ b/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java
            @@ -55,6 +55,9 @@ public class MavenArtifact implements Comparable<MavenArtifact> {
                  * Is this a Jenkins plugin?
                  */
                 public boolean isPlugin() throws IOException {
            +        if ("system".equals(getScope())) {
            +            return false;
            +        }
                     String type = getResolvedType();
                     return type.equals("hpi") || type.equals("jpi");
                 }
            
            Show
            danielbeck Daniel Beck added a comment - Tentative fix idea, WDYT? $ git diff diff --git a/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java b/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java index e5b4c0c..bffa23e 100644 --- a/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java +++ b/src/main/java/org/jenkinsci/maven/plugins/hpi/MavenArtifact.java @@ -55,6 +55,9 @@ public class MavenArtifact implements Comparable<MavenArtifact> { * Is this a Jenkins plugin? */ public boolean isPlugin() throws IOException { + if ("system".equals(getScope())) { + return false; + } String type = getResolvedType(); return type.equals("hpi") || type.equals("jpi"); }
            Hide
            jglick Jesse Glick added a comment -

            Sure. Does it work?

            Show
            jglick Jesse Glick added a comment - Sure. Does it work?
            Hide
            danielbeck Daniel Beck added a comment -

            It seems like it (hpi:run starts with <hpi-plugin.version>3.15-SNAPSHOT</hpi-plugin.version> in the plugin pom.xml despite <jenkins.version>2.230</jenkins.version>), but no idea how to even write a test for it without keeping https://repo.jenkins-ci.org/JENKINS-61937 around indefinitely.

            Show
            danielbeck Daniel Beck added a comment - It seems like it ( hpi:run starts with  <hpi-plugin.version>3.15-SNAPSHOT</hpi-plugin.version> in the plugin pom.xml despite <jenkins.version>2.230</jenkins.version> ), but no idea how to even write a test for it without keeping https://repo.jenkins-ci.org/JENKINS-61937 around indefinitely.
            Hide
            danielbeck Daniel Beck added a comment -
            Show
            danielbeck Daniel Beck added a comment - https://github.com/jenkinsci/maven-hpi-plugin/pull/181 proposed the change from above.
            Hide
            jglick Jesse Glick added a comment -

            Suggested a simpler and more general fix in the PR discussion. Not the first time an exception from isPlugin has been treated as fatal when it really should not have been.

            Show
            jglick Jesse Glick added a comment - Suggested a simpler and more general fix in the PR discussion. Not the first time an exception from isPlugin has been treated as fatal when it really should not have been.
            Hide
            wfollonier Wadeck Follonier added a comment -

            Got the same error with 3.13, tested with 3.15 (with this correction), got error in the log but it was not stopping the build :tada:

            Show
            wfollonier Wadeck Follonier added a comment - Got the same error with 3.13, tested with 3.15 (with this correction), got error in the log but it was not stopping the build :tada:

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              danielbeck Daniel Beck
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: