Hi

Mark and I spent yesterday trying to figure out what is going on with
this failing build. Here are our finding this far for
maven-repository-plugin.


1. maven-invoker-plugin is used to install the current artifact
(maven-repository-plugin) into a special repository used by the ITs,
namely target/it-repo. The ITs are set up with their own repo so that
the users local repository is not messed with.

2. maven-repository-collector-plugin is used to resolve the current
artifact's (maven-repository-plugin) dependencies from the local
repository to target/it-repo.

3. maven-surefire-plugin is used to run the ITs. When doing this it sets
a system property maven.repo.local and points that to target/it-repo.


When this is run with Maven 3.0.3 on the command line like this:
  mvn clean verify -Prun-its
all is well and the ITs pass.

When this is run with Maven 3.0.3 on the command line like this:
  mvn clean verify -Prun-its -Dmaven.repo.local=/local/repository
the build fails because it cannot find maven-repository-plugin in the
local repository.

This is the way the CI builds are run, but it can be reproduced locally
by adding the extra command line parameter.

What seems to happening in that the -Dmaven.local.repository command
line parameter overrides the system property set for the Surefire
Plugin. Thus making maven-surefire-plugin look for
maven-repository-plugin in the wrong repository (/local/repository).

Does anyone have ideas how we can solve this?


On 2011-07-30 01:22, Mark Struberg wrote:
> Hi!
> 
> Our CI is broken since a while and most of the errors are of the following 
> kind:
> 
> 
> [ERROR] Plugin 
> org.apache.maven.plugins:maven-repository-plugin:2.3.2-SNAPSHOT or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor for 
> org.apache.maven.plugins:maven-repository-plugin:jar:2.3.2-SNAPSHOT: Failure 
> to find org.apache.maven.plugins:maven-repository-plugin:pom:2.3.2-SNAPSHOT 
> in 
> /home/hudson/hudson-slave/workspace/maven-plugins-ITs-3.x/maven-repository-plugin/target/it-repo
>  was cached in the local repository, resolution will not be reattempted until 
> the update interval of local.central has elapsed or updates are forced -> 
> [Help 1]
> org.apache.maven.plugin.PluginResolutionException: Plugin 
> org.apache.maven.plugins:maven-repository-plugin:2.3.2-SNAPSHOT or one of its 
> dependencies could not be resolved: Failed to read artifact descriptor for 
> org.apache.maven.plugins:maven-repository-plugin:jar:2.3.2-SNAPSHOT
>       at 
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
>       at 
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
>       at 
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
>       at 
> org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:235)
>       at 
> org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
>       at 
> org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:592)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed 
> to read artifact descriptor for 
> org.apache.maven.plugins:maven-repository-plugin:jar:2.3.2-SNAPSHOT
>       at 
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
>       at 
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:172)
>       at 
> org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:316)
>       at 
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
>       ... 20 more
> Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: 
> Failure to find 
> org.apache.maven.plugins:maven-repository-plugin:pom:2.3.2-SNAPSHOT in 
> /home/hudson/hudson-slave/workspace/maven-plugins-ITs-3.x/maven-repository-plugin/target/it-repo
>  was cached in the local repository, resolution will not be reattempted until 
> the update interval of local.central has elapsed or updates are forced
>       at 
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
>       at 
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
>       at 
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197)
>       at 
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
>       ... 23 more
> Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to 
> find org.apache.maven.plugins:maven-repository-plugin:pom:2.3.2-SNAPSHOT in 
> /home/hudson/hudson-slave/workspace/maven-plugins-ITs-3.x/maven-repository-plugin/target/it-repo
>  was cached in the local repository, resolution will not be reattempted until 
> the update interval of local.central has elapsed or updates are forced
>       at 
> org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:190)
>       at 
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430)
>       ... 26 more
> 
> 
> Here is the full story:
> 
> https://builds.apache.org/job/maven-plugins-ITs-3.x/ws/maven-repository-plugin/target/surefire-reports/org.apache.maven.plugins.repository.it.BundleCreateIT.txt
> 
> The weird thing is that this artifact exists:
> https://builds.apache.org/job/maven-plugins-ITs-3.x/ws/maven-repository-plugin/target/it-repo/org/apache/maven/plugins/maven-repository-plugin/2.3.2-SNAPSHOT/
> 
> 
> We (rfscholte nor I) cannot reproduce those bugs locally. All the tests just 
> run fine here. 
> Is there some magic switch we need to set in Jenkins, or is this a real bug?
> 
> txs and LieGrue,
> strub
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to