免責事項: 非pom.xml
開示の制限により、プロジェクトの完全なファイルをここに投稿することはできません。ただし、関連する部分を抽出して、私が直面している問題を説明しました。私の組織は最近 Artifactory を購入し、自動化された CI/CD ビルド パイプラインを Gitlab に統合する作業を行っているため、JFrog Web サイトの公式チュートリアルに従ってみました。
パイプラインが失敗するコマンドは、(JFrog CLI 経由で) 実際に maven を呼び出す場所です。
./jfrog rt mvn "clean compile install package -DskipTests" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID
表示されるエラー メッセージは次のようなものです。そして、実際にはこの時点でハングします。JFrog CLI は終了コードを返さないため、最終的に Gitlab パイプラインを強制終了する必要があります。
$ ./jfrog rt mvn "clean compile install package -DskipTests" configuration.yml --build-name=gitlabci-maven-artifactory --build-number=$CI_JOB_ID
[Info] Running Mvn...
[Info] Downloading jfrog/jfrog-jars/org/jfrog/buildinfo/build-info-extractor-maven3/2.9.2/build-info-extractor-maven3-2.9.2-uber.jar
[Info] [1]: 206 Partial Content...
[Info] [0]: 206 Partial Content...
[Info] [2]: 206 Partial Content...
[Info] Done downloading.
[Info] Downloaded 1 artifact.
...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - -------------------< com.mydomain:myproject >-------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building MyProject 1.0.0
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]---------------------------------
[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:282)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate (PlexusLifecycleManager.java:203)
at org.eclipse.sisu.bean.BeanScheduler.schedule (BeanScheduler.java:151)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.manage (PlexusLifecycleManager.java:147)
at org.eclipse.sisu.plexus.PlexusBeanBinder.afterInjection (PlexusBeanBinder.java:72)
at com.google.inject.internal.MembersInjectorImpl.notifyListeners (MembersInjectorImpl.java:119)
at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:115)
at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call (InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
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:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call (ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call (InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1012)
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:97)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.artifactResolving (DefaultArtifactResolver.java:640)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:254)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:201)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom (DefaultArtifactDescriptorReader.java:261)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor (DefaultArtifactDescriptorReader.java:192)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor (DefaultRepositorySystem.java:253)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:103)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:181)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244)
at org.apache.maven.lifecycle.internal.DefaultLifecycleMappingDelegate.calculateLifecycleMappings (DefaultLifecycleMappingDelegate.java:115)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings (DefaultLifecycleExecutionPlanCalculator.java:265)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions (DefaultLifecycleExecutionPlanCalculator.java:216)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:126)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:144)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan (BuilderCommon.java:96)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:110)
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:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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:4189)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
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:282)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate (PlexusLifecycleManager.java:203)
at org.eclipse.sisu.bean.BeanScheduler.schedule (BeanScheduler.java:151)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.manage (PlexusLifecycleManager.java:147)
at org.eclipse.sisu.plexus.PlexusBeanBinder.afterInjection (PlexusBeanBinder.java:72)
at com.google.inject.internal.MembersInjectorImpl.notifyListeners (MembersInjectorImpl.java:119)
at com.google.inject.internal.ConstructorInjector.provision (ConstructorInjector.java:115)
at com.google.inject.internal.ConstructorInjector.access$000 (ConstructorInjector.java:32)
at com.google.inject.internal.ConstructorInjector$1.call (ConstructorInjector.java:89)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ConstructorInjector.construct (ConstructorInjector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get (ConstructorBindingImpl.java:267)
at com.google.inject.internal.InjectorImpl$2$1.call (InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$CycleActivator.onProvision (BeanScheduler.java:230)
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:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call (ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get (ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get (SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get (InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call (InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext (InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get (InjectorImpl.java:1012)
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:97)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.artifactResolving (DefaultArtifactResolver.java:640)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:254)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:201)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom (DefaultArtifactDescriptorReader.java:261)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor (DefaultArtifactDescriptorReader.java:192)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor (DefaultRepositorySystem.java:253)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:103)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:181)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor (DefaultMavenPluginManager.java:286)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor (DefaultBuildPluginManager.java:244)
at org.apache.maven.lifecycle.internal.DefaultLifecycleMappingDelegate.calculateLifecycleMappings (DefaultLifecycleMappingDelegate.java:115)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings (DefaultLifecycleExecutionPlanCalculator.java:265)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions (DefaultLifecycleExecutionPlanCalculator.java:216)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:126)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan (DefaultLifecycleExecutionPlanCalculator.java:144)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan (BuilderCommon.java:96)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:110)
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:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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)
[main] WARNING org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher - Failed to dispatch repository event to org.jfrog.build.extractor.maven.resolver.ArtifactoryEclipseRepositoryListener: null
Downloading from central: http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.0.1.RELEASE/spring-boot-maven-plugin-2.0.1.RELEASE.pom
Progress (1): 4.1/4.8 kB
Progress (1): 4.8 kB
Downloaded from central: http://repo1.maven.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.0.1.RELEASE/spring-boot-maven-plugin-2.0.1.RELEASE.pom (4.8 kB at 226 kB/s)
私のPOMファイルでは、ArtifactoryとともにMaven Centralリポジトリをlibs-release
andとして参照していlibs-snapshot
ます。libs-release-local
セクションでandを使用libs-snapshot-local
し<distributionManagement>
ます。すべての依存関係を正常にダウンロードしているようです。ArtifactoryEclipseArtifactResolver
ただし、なぜこのビットにハングアップしているのかわかりません。
どうすればいいのかよくわかりません。ローカル システムで通常の Maven を実行し、すべてを機能させることができるため、これは明らかに JFrog CLI (またはおそらく私が呼び出している方法) の問題のように思えます。しかし、これを修正して CI/CD を機能させる方法がわかりません。