You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Dehning (JIRA)" <ji...@codehaus.org> on 2009/11/06 12:42:55 UTC
[jira] Commented: (MNG-4001) Unable to resolve Dashboard mojo from
Central
[ http://jira.codehaus.org/browse/MNG-4001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197471#action_197471 ]
Christian Dehning commented on MNG-4001:
----------------------------------------
Hello there,
Deleting the org/codehaus/mojo folder only works sometimes for me, so i tried out, which file or folder exactly is the one causing the whole plugin to break.
For your information:
I'm using Hudson 1.329 and Sonar 1.11.
When I launch my builds, i sometimes get the following messages:
{quote}
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'sonar'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1568)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1808)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:446)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:176)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
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.PluginVersionNotFoundException: The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:229)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:91)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:172)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1539)
... 15 more
{quote}
To fix this, i only have to replace this file:
org/codehaus/mojo/sonar-maven-plugin/maven-metadata-central.xml
*I don't know what is changing this file and causes all my builds to crash, but somehow, the whole version and versioning tags get deleted!*
This is how the file looks like, when the builds work:
{quote}
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<versioning>
<latest>1.0-beta-1</latest>
<release>1.0-beta-1</release>
<versions>
<version>1.0-beta-1</version>
</versions>
<lastUpdated>20090422092422</lastUpdated>
</versioning>
</metadata>
{quote}
And this is how it looks like, when I get those error-messages from above:
{quote}
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
</metadata>
{quote}
That may explain, why I get the message "The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found", because there is no more version entry in this xml-file!
I think following question is the one the has to be answered: What is changing the maven-metadata-central.xml file of the sonar-maven-plugin by deleting those tags?
I hope this helps you to fix this bug!
Cheers,
Christian Dehning
> Unable to resolve Dashboard mojo from Central
> ---------------------------------------------
>
> Key: MNG-4001
> URL: http://jira.codehaus.org/browse/MNG-4001
> Project: Maven 2
> Issue Type: Bug
> Components: Sites & Reporting
> Affects Versions: 2.0.9
> Environment: Windows, JDK 1.6
> Reporter: Anthony Whitford
> Assignee: Brett Porter
> Fix For: 2.2.x
>
> Attachments: dashbug.zip
>
>
> I have a simple test project that declares the dashboard-maven-plugin (see http://mojo.codehaus.org/dashboard-maven-plugin/usage.html ).
> Note that the usage does explicitly state that the Codehaus repository must be specified as a plugin repository...
> However, according to: http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html
> I'm pretty sure that Maven should be able to resolve the dashboard-maven-plugin from the central repo.
> I validated that the [dashboard-maven-plugin residing in central|http://repo1.maven.org/maven2/org/codehaus/mojo/dashboard-maven-plugin/1.0.0-beta-1/] is indeed the same artifact as that which lives at the [codehaus repository|http://repository.codehaus.org/org/codehaus/mojo/dashboard-maven-plugin/1.0.0-beta-1/].
> But as you can see from my attached test case, the codehaus mojo is NOT being resolved without the special plugin repository defined. When running {noformat}mvn dashboard:dashboard{noformat}, I get the following error message:
> {noformat}
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'dashboard'.
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-dashboard-plugin' does not exist or no valid version could be found
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Jan 24 12:40:55 PST 2009
> [INFO] Final Memory: 1M/254M
> [INFO] ------------------------------------------------------------------------{noformat}
> If you edit the pom.xml to uncomment out the plugin repository declaration for codehaus, it works as one would expect.
> My understanding is that the only reason why the Dashboard Usage mentions their plugin repository is because the artifact was not available on the central repository -- but it certainly is today.
> I also thought that perhaps the maven-metadata.xml might be incorrect (perhaps the dashboard plugin prefix is missing or different). I checked:
> * http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
> * http://repository.codehaus.org/org/codehaus/mojo/maven-metadata.xml
> and they both look OK to me... I clearly see:{code:xml}
> <plugin>
> <name>Maven Dashboard Report Plugin</name>
> <prefix>dashboard</prefix>
> <artifactId>dashboard-maven-plugin</artifactId>
> </plugin>
> {code}
> And I don't see any plugin with a dashboard prefix specified as an Apache Maven Plugin here:
> * http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
> If I explicitly specify the dashboard plugin like: {noformat}mvn org.codehaus.mojo:dashboard-maven-plugin:dashboard{noformat}
> that works...
> Overall, I am recording a bug because the [documentation|http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html] states:{quote}
> Maven will always search the following groupId's after searching any plugin groups specified in the user's settings:
> * org.apache.maven.plugins
> * org.codehaus.mojo
> {quote}
> I don't see this being done.
> Finally, I even tried adding a {{pluginGroups}} to my {{settings.xml}}:{code:xml}
> <pluginGroups>
> <pluginGroup>org.codehaus.mojo</pluginGroup>
> </pluginGroups>
> {code}
> But that did not work either...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira