Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1466

Surefire fails on a dummy:dummy dependency with a authenticating proxy

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.18.1, 2.20.1
    • Fix Version/s: 3.0.0-M1
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Environment:
      Stack traces with Maven 3.3.9, but also tried with latest

      Description

      We have a rather limited environment, internet is available through an authenticated proxy, and most things we get from a company nexus.

      Getting artifacts from either works fine, but it seems surefire does something fancy that breaks and ends in a ArtifactResolutionException regarding proxy authentication, related to a dummy:dummy artifact (which seems to be some hacky provider classpath resolving things in surefire?).

      Error message:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project BsnkInterfaceHandlerService: Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.apache.maven.surefire:surefire-junit4:jar:2.18.1: Failed to retrieve POM for org.apache.maven.surefire:surefire-junit4:jar:2.18.1: Could not transfer artifact org.apache.maven.surefire:surefire-junit4:pom:2.18.1 from/to prog-sys-development (https://<there is a server name here i don't want you to know :)>/nexus/content/groups/prog-sys-development): Not authorized by proxy , ReasonPhrase:authenticationrequired.
      [ERROR] org.apache.maven.surefire:surefire-junit4:jar:2.18.1
      [ERROR]
      [ERROR] from the specified remote repositories:
      [ERROR] prog-sys-development (https://<there is a server name here i don't want you to know :)>/nexus/content/groups/prog-sys-development, releases=true, snapshots=false)
      [ERROR] Path to dependency:
      [ERROR] 1) dummy:dummy:jar:1.0
      [ERROR] -> [Help 1]

      Stack trace of the issue (first):

      Thread [main] (Suspended (exception ArtifactResolutionException))    
          DefaultArtifactCollector(DefaultLegacyArtifactCollector).recurse(ArtifactResolutionResult, ResolutionNode, Map<Object,List<ResolutionNode>>, ManagedVersionMap, ArtifactResolutionRequest, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>, List<ConflictResolver>) line: 576    
          DefaultArtifactCollector(DefaultLegacyArtifactCollector).collect(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactResolutionRequest, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>, List<ConflictResolver>) line: 144    
          DefaultArtifactResolver.resolve(ArtifactResolutionRequest) line: 493    
          DefaultArtifactResolver.resolveWithExceptions(ArtifactResolutionRequest) line: 348    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>, List<ConflictResolver>) line: 342    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>) line: 321    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter) line: 286    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter) line: 261    
          SurefireDependencyResolver.resolveArtifact(Artifact, Artifact) line: 125    
          SurefireDependencyResolver.getProviderClasspath(String, String, Artifact) line: 140    
          AbstractSurefireMojo$JUnit4ProviderInfo.getProviderClasspath() line: 2392    
          SurefirePlugin(AbstractSurefireMojo).createStartupConfiguration(ProviderInfo, ClassLoaderConfiguration) line: 1473    
          SurefirePlugin(AbstractSurefireMojo).createForkStarter(ProviderInfo, ForkConfiguration, ClassLoaderConfiguration, RunOrderParameters, Log) line: 1758    
          SurefirePlugin(AbstractSurefireMojo).executeProvider(ProviderInfo, DefaultScanResult) line: 987    
          SurefirePlugin(AbstractSurefireMojo).executeAfterPreconditionsChecked(DefaultScanResult) line: 824    
          SurefirePlugin(AbstractSurefireMojo).execute() line: 722    
          DefaultBuildPluginManager.executeMojo(MavenSession, MojoExecution) line: 134    
          MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext) line: 207    
          MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext, PhaseRecorder) line: 153    
          MojoExecutor.execute(MavenSession, List<MojoExecution>, ProjectIndex) line: 145    
          LifecycleModuleBuilder.buildProject(MavenSession, MavenSession, ReactorContext, MavenProject, TaskSegment) line: 116    
          LifecycleModuleBuilder.buildProject(MavenSession, ReactorContext, MavenProject, TaskSegment) line: 80    
          SingleThreadedBuilder.build(MavenSession, ReactorContext, ProjectBuildList, List<TaskSegment>, ReactorBuildStatus) line: 51    
          LifecycleStarter.execute(MavenSession) line: 128    
          DefaultMaven.doExecute(MavenExecutionRequest, MavenSession, MavenExecutionResult, DefaultRepositorySystemSession) line: 307    
          DefaultMaven.doExecute(MavenExecutionRequest) line: 193    
          DefaultMaven.execute(MavenExecutionRequest) line: 106    
          MavenCli.execute(CliRequest) line: 863    
          MavenCli.doMain(CliRequest) line: 288    
          MavenCli.main(String[], ClassWorld) line: 199    
          NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]    
          NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62    
          DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43    
          Method.invoke(Object, Object...) line: 498    
          Launcher.launchEnhanced(String[]) line: 289    
          Launcher.launch(String[]) line: 229    
          Launcher.mainWithExitCode(String[]) line: 415    
          Launcher.main(String[]) line: 356    
      

      And second (the exception triggers twice in my debugger):

      Thread [main] (Suspended (exception ArtifactResolutionException))    
          DefaultResolutionErrorHandler.throwErrors(ArtifactResolutionRequest, ArtifactResolutionResult) line: 43    
          DefaultArtifactResolver.resolveWithExceptions(ArtifactResolutionRequest) line: 354    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>, List<ConflictResolver>) line: 342    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter, List<ResolutionListener>) line: 321    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, Map<String,Artifact>, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter) line: 286    
          DefaultArtifactResolver.resolveTransitively(Set<Artifact>, Artifact, ArtifactRepository, List<ArtifactRepository>, ArtifactMetadataSource, ArtifactFilter) line: 261    
          SurefireDependencyResolver.resolveArtifact(Artifact, Artifact) line: 125    
          SurefireDependencyResolver.getProviderClasspath(String, String, Artifact) line: 140    
          AbstractSurefireMojo$JUnit4ProviderInfo.getProviderClasspath() line: 2392    
          SurefirePlugin(AbstractSurefireMojo).createStartupConfiguration(ProviderInfo, ClassLoaderConfiguration) line: 1473    
          SurefirePlugin(AbstractSurefireMojo).createForkStarter(ProviderInfo, ForkConfiguration, ClassLoaderConfiguration, RunOrderParameters, Log) line: 1758    
          SurefirePlugin(AbstractSurefireMojo).executeProvider(ProviderInfo, DefaultScanResult) line: 987    
          SurefirePlugin(AbstractSurefireMojo).executeAfterPreconditionsChecked(DefaultScanResult) line: 824    
          SurefirePlugin(AbstractSurefireMojo).execute() line: 722    
          DefaultBuildPluginManager.executeMojo(MavenSession, MojoExecution) line: 134    
          MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext) line: 207    
          MojoExecutor.execute(MavenSession, MojoExecution, ProjectIndex, DependencyContext, PhaseRecorder) line: 153    
          MojoExecutor.execute(MavenSession, List<MojoExecution>, ProjectIndex) line: 145    
          LifecycleModuleBuilder.buildProject(MavenSession, MavenSession, ReactorContext, MavenProject, TaskSegment) line: 116    
          LifecycleModuleBuilder.buildProject(MavenSession, ReactorContext, MavenProject, TaskSegment) line: 80    
          SingleThreadedBuilder.build(MavenSession, ReactorContext, ProjectBuildList, List<TaskSegment>, ReactorBuildStatus) line: 51    
          LifecycleStarter.execute(MavenSession) line: 128    
          DefaultMaven.doExecute(MavenExecutionRequest, MavenSession, MavenExecutionResult, DefaultRepositorySystemSession) line: 307    
          DefaultMaven.doExecute(MavenExecutionRequest) line: 193    
          DefaultMaven.execute(MavenExecutionRequest) line: 106    
          MavenCli.execute(CliRequest) line: 863    
          MavenCli.doMain(CliRequest) line: 288    
          MavenCli.main(String[], ClassWorld) line: 199    
          NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]    
          NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62    
          DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43    
          Method.invoke(Object, Object...) line: 498    
          Launcher.launchEnhanced(String[]) line: 289    
          Launcher.launch(String[]) line: 229    
          Launcher.mainWithExitCode(String[]) line: 415    
          Launcher.main(String[]) line: 356    
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tibordigana Tibor Digana
                Reporter:
                cranphin J.Cranendonk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: