Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1250

Hangs when Using with pipeline-maven-plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None

      Description

      In order to configure maven environment, we use "withMaven" step from pipeline-maven-plugin to set up configuration dynamically and monitor the build and collect unit test and other artifacts

      We also need access to BuilInfo generated by Artifactory plugin in order to use XRay

      However when combining the two, Artifactory "rtMaven.run" step hangs the build indefinitely with following stack trace

      Upon examining this closely, it seems that pipeline-maven-plugin adds a maven extension via:

      ...
      Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path=".../withMavenbfdda382/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder=".../withMavenbfdda382"
      ...
      

      Removing this allows build to succeed, but we obviously lose a lot of functionality

      Is there a way to make these two play nice together and if not, is there a way to generate BildInfo object without running build via Artifactory plugin (i.e. running it via simple "sh mvn"?)

       

      Thank you

      Stack Trace mentioned above:

       

      [main] ERROR org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener - Failed while enforcing Artifactory artifact resolver
      org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
            role: org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseArtifactResolver
        roleHint: 
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:237)
      	at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.enforceArtifactoryResolver(ArtifactoryEclipseRepositoryListener.java:71)
      	at org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener.contextualize(ArtifactoryEclipseRepositoryListener.java:258)
      	at org.eclipse.sisu.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:287)
      	at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:203)
      	at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156)
      	at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
      	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
      	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
      	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
      	at org.eclipse.sisu.wire.EntrySetAdapter$ValueIterator.next(EntrySetAdapter.java:102)
      	at org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher.dispatch(DefaultRepositoryEventDispatcher.java:91)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.artifactResolving(DefaultArtifactResolver.java:662)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:276)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
      	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
      	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
      	at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:193)
      	at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:246)
      	at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:978)
      	at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:796)
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:325)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:469)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:438)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:401)
      	at org.jfrog.build.extractor.maven.ArtifactoryProjectBuilder.build(ArtifactoryProjectBuilder.java:34)
      	at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
      	at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
      	at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
      	at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
      	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:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: java.util.NoSuchElementException
      	at java.util.Collections$EmptyIterator.next(Collections.java:4191)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
      	... 55 more
      

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yahavi Yahav Itzhak
              Reporter:
              mlasevich Michael Lasevich
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: