|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
Sonar build fails when multiple repositories are usedHi all ,
I have used mutilple repositories in my pom.xml . As a reason sonar build fails for my project . The error stack is as shown below ... [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.codehaus.mojo:sonar-maven-plugin Reason: Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) for project org.codehaus.mojo:sonar-maven-plugin [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error resolving version for 'org.codehaus.mojo:sonar-maven-plugin': Unable to read the metadata file for artifact 'org.codehaus.mojo:sonar-maven-plugin:pom': Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) for project org.codehaus.mojo:sonar-maven-plugin at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1549) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:462) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:175) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for 'org.codehaus.mojo:sonar-maven-plugin': Unable to read the metadata file for artifact 'org.codehaus.mojo:sonar-maven-plugin:pom': Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) for project org.codehaus.mojo:sonar-maven-plugin at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveMetaVersion(DefaultPluginVersionManager.java:682) at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:187) at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91) at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:179) at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540) ... 15 more Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Unable to read the metadata file for artifact 'org.codehaus.mojo:sonar-maven-plugin:pom': Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) for project org.codehaus.mojo:sonar-maven-plugin at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:200) at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:299) at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolveMetaVersion(DefaultPluginVersionManager.java:673) ... 20 more Caused by: org.apache.maven.project.ProjectBuildingException: Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) for project org.codehaus.mojo:sonar-maven-plugin at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:592) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251) at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163) ... 22 more Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: flexmojos-repository (http://repository.sonatype.org/content/groups/public), central (http://repo1.maven.org/maven2) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:221) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558) ... 24 more Can anyone help me regarding this ? Thanks , Nanditha |
|
|
Re: Sonar build fails when multiple repositories are usedHi Nanditha,
Take a look at the following Sonar FAQ : http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Theplugin%27org.apache.maven.plugins%3Amavensonarplugin%27doesnotexistornovalidversioncouldbefound Hope it helps, Freddy On Thu, Oct 29, 2009 at 9:48 AM, nandyiyer <nandussiyer@...> wrote:
|
|
|
Re: Sonar build fails when multiple repositories are usedNopes . It didnt work . The same problem still persists ...
|
|
|
Re: Sonar build fails when multiple repositories are usedHere are few new questions :
Are you using the command "mvn sonar:sonar" ? Are you using the Maven mirror feature ? In your local Maven repository, what is the content of the file org/codehaus/mojo/sonar-maven-plugin/maven-metadata.xml ? Regards Freddy On Fri, Oct 30, 2009 at 1:36 AM, nandyiyer <nandussiyer@...> wrote:
|
|
|
Re: Sonar build fails when multiple repositories are used> Nopes . It didnt work . The same problem still persists ...
> I use this options in my poms, and sonar works well inside hudson (two source dirs, src and Generated JUIC files): <build> <sourceDirectory>src</sourceDirectory> <outputDirectory>bin</outputDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin </artifactId> <version>1.2</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>Generated JUIC files</source> <source>src</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> <properties> <sonar.phase>generate-sources</sonar.phase> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> </project> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedHello Freddy,
same problem here. I found the missing artefact deployed on the sonatype public repository: http://repository.sonatype.org/content/groups/public/org/codehaus/mojo/sonar-maven-plugin/1.0-SNAPSHOT/ I have configured this repository in my nexus as release-repository. Could this be the reason, why the SNAPSHOT version could not be found? Do I need to add the same repository with SNAPSHOT-settings? Freddy Mallet schrieb: > Take a look at the following Sonar FAQ : > > http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Theplugin%27org.apache.maven.plugins%3Amavensonarplugin%27doesnotexistornovalidversioncouldbefound Regards, Lars --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedLars Fischer schrieb:
> > Do I need to add the same repository with SNAPSHOT-settings? I tried this and now its working. But now I have some questions: 1.) Is is a good idea to deploy releases and snapshots to the same public repository? I would like to see a second public-snapshots sonatype repository... ;) 2.) Why is a SNAPSHOT dependency used in a public released product? (I use sonar 1.11.1) Regards, Lars --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedHello,
I would to bring some clarifications as several assumptions have been madehere. 1. http://repository.sonatype.org is a repository managed by Sonatype, that aggregates many repository. Those repository can contain anything 2. We only publish releases, not snapshots 3. The latest version of the mojo is 1.0-beta-1 : http://repository.sonatype.org/content/groups/public/org/codehaus/mojo/sonar-maven-plugin/1.0-beta-1/ Having said that, we did publish by mistake a 1.0-snapshot on the 6th of June and this was apparently captured by some repositories. As this snapshot version is more recent than the 1.0-beta-1, if you do not explicitly mention the version it is going to try to download the 1.0-snapshot version and then fails as it does not exist (was removed). I am going to see if I can get it fixed in Sonatype repo. For the time being, I would recommend you set the version of the mojo. Olivier On Tue, Nov 3, 2009 at 12:03 PM, Lars Fischer <lfischer@...> wrote: Lars Fischer schrieb: |
|
|
Re: Sonar build fails when multiple repositories are usedHello Olivier,
I hope you have recognised the smiley. My post wasn't intended as offence. Olivier Gaudin schrieb: > I would to bring some clarifications as several assumptions have been > madehere. > > 1. http://repository.sonatype.org <http://repository.sonatype.org/> is a > repository managed by Sonatype, that aggregates many repository. Those > repository can contain anything > 2. We only publish releases, not snapshots > 3. The latest version of the mojo is 1.0-beta-1 : > http://repository.sonatype.org/content/groups/public/org/codehaus/mojo/sonar-maven-plugin/1.0-beta-1/ > > Having said that, we did publish by mistake a 1.0-snapshot on the 6th of > June and this was apparently captured by some repositories. As this > snapshot version is more recent than the 1.0-beta-1, if you do not > explicitly mention the version it is going to try to download the > 1.0-snapshot version and then fails as it does not exist (was removed). Thank you for the clarification. > I am going to see if I can get it fixed in Sonatype repo. For the time > being, I would recommend you set the version of the mojo. I execute sonar within a hudson ci-build. Can I change the mojo version by using plugin-management / dependency-management in the parent pom of my projects? Regards, Lars --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedNo pb at all Lars. This whole thing is a bit annoying as it gives a bad impression and fixing it is not in our hands...
Anyway, the answer to your question is : absolutely, you should use 1.0-beta-1 as a version. Olivier On Tue, Nov 3, 2009 at 3:28 PM, Lars Fischer <lfischer@...> wrote: Hello Olivier, |
|
|
Re: Sonar build fails when multiple repositories are usedLars,
Could you give it an other try as I think it should be fixed now. Thanks Olivier On Tue, Nov 3, 2009 at 3:45 PM, Olivier Gaudin <gaudol@...> wrote: No pb at all Lars. This whole thing is a bit annoying as it gives a bad impression and fixing it is not in our hands... |
|
|
Re: Sonar build fails when multiple repositories are usedHello Olivier,
Olivier Gaudin schrieb: > Could you give it an other try as I think it should be fixed now. I removed all org.codehaus.mojo artefacts from my nexus and the hudson local repository and disabled the "sonatype-snapshot" repository. Then I tried to execute sonar without setting the version to 1.0-beta-1. This results in the same error: [INFO]----------------------------------------------------------------------- [INFO] BUILD SUCCESSFUL [INFO]------------------------------------------------------------------------ [INFO] Total time: 29 seconds [INFO] Finished at: Wed Nov 04 09:38:58 CET 2009 [INFO] Final Memory: 17M/34M [INFO]------------------------------------------------------------------------ channel stopped ln failed: -1 ln failed: -1 [core] $ /usr/local/tools/hudson/hudson_home/tools/Maven_2_0_9/bin/mvn -e -B -f pom.xml -Dsonar.jdbc.driver=org.apache.derby.jdbc.ClientDriver -Dsonar.jdbc.username=sonar -Dsonar.jdbc.password=sonar -Dsonar.jdbc.url=jdbc:derby://localhost:1527/sonar;create=true -Dsonar.host.url=http://localhost:9080/sonar sonar:sonar + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] snapshot com.ibykus.apx:parent.osgibundle:1.1.0-SNAPSHOT: checking for updates from public-snapshots [INFO] snapshot com.ibykus.apx:parent:1.1.0-SNAPSHOT: checking for updates from public-snapshots [INFO] Searching repository for plugin with prefix: 'sonar'. [INFO] org.codehaus.mojo: checking for updates from public [INFO] org.codehaus.mojo: checking for updates from public-snapshots [INFO] org.codehaus.mojo: checking for updates from central [INFO] artifact org.codehaus.mojo:sonar-maven-plugin: checking for updates from public [INFO] artifact org.codehaus.mojo:sonar-maven-plugin: checking for updates from public-snapshots [INFO] artifact org.codehaus.mojo:sonar-maven-plugin: checking for updates from central [INFO] snapshot org.codehaus.mojo:sonar-maven-plugin:1.0-SNAPSHOT: checking for updates from public-snapshots [INFO]------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO]------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.codehaus.mojo:sonar-maven-plugin Reason: Error getting POM for 'org.codehaus.mojo:sonar-maven-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.codehaus.mojo:sonar-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: public (http://slief116:9080/nexus/content/groups/public), public-snapshots (http://slief116:9080/nexus/content/groups/public-snapshots) for project org.codehaus.mojo:sonar-maven-plugin Using a parent pom with a pluginmanagement setting <version>1.0-beta-1</version>. Sonar is running fine. Do you expect an other result? What do I have to change to test your fix? Regards, Lars --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedCan someone explain why are mirrors needed and how can they be helpful in this situation ?
Thanks, Nanditha
|
|
|
Re: Sonar build fails when multiple repositories are usedOk, there still seem to be a snapshot left on the sonatype repo. Bear with me.
Olivier On Wed, Nov 4, 2009 at 10:03 AM, Lars Fischer <lfischer@...> wrote: Hello Olivier, |
|
|
Re: Sonar build fails when multiple repositories are usedHello Nanditha,
Mirrors are not needed at all to run Sonar. Olivier On Wed, Nov 4, 2009 at 1:40 PM, nandyiyer <nandussiyer@...> wrote:
|
|
|
Re: Sonar build fails when multiple repositories are usedHello Lars,
The last one seems to be gone this time. Can you try again cleaning up your local and nexus repo for org/codehaus/mojo first ? Thanks you for your help ! Olivier On Wed, Nov 4, 2009 at 3:31 PM, Olivier Gaudin <gaudol@...> wrote: Ok, there still seem to be a snapshot left on the sonatype repo. Bear with me. |
|
|
Re: Sonar build fails when multiple repositories are usedOlivier Gaudin schrieb:
> The last one seems to be gone this time. Can you try again cleaning up > your local and nexus repo for org/codehaus/mojo first ? I tested again and now I it's working fine. Great... thank you for fixing! :) Lars --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar build fails when multiple repositories are usedExcellent !
Thanks for your patience. Olivier On Wed, Nov 4, 2009 at 6:59 PM, Lars Fischer <lfischer@...> wrote: Olivier Gaudin schrieb: |
| Free embeddable forum powered by Nabble | Forum Help |