That appears to be an artifact of some other experiments that I did. I deleted the contents of my .m2\repository\org\myproject\plugins file and ran again. It gets this error:
C:\tmp\maven-user\maven-script-ant>mvn org.myproject.plugins:hello-plugin:hello [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/org/myproject/plugins/hello-plugin/maven-metadata.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.907s [INFO] Finished at: Thu Dec 16 13:25:21 EST 2010 [INFO] Final Memory: 1M/3M [INFO] ------------------------------------------------------------------------ [ERROR] Could not find goal 'hello' in plugin org.myproject.plugins:hello-plugin:1.0-SNAPSHOT among available goals -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException This is what I now get from the describe call: C:\tmp\maven-user\maven-script-ant>mvn help:describe -Dplugin=hello [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/org/myproject/plugins/maven-metadata.xml [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Hello Plugin 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-help-plugin:2.1.1:describe (default-cli) @ hello-plugin --- [INFO] org.myproject.plugins:hello-plugin:1.0-SNAPSHOT Name: Hello Plugin Description: (no description available) Group Id: org.myproject.plugins Artifact Id: hello-plugin Version: 1.0-SNAPSHOT Goal Prefix: hello This plugin has 0 goal: For more information, run 'mvn help:describe [...] -Ddetail' [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.578s [INFO] Finished at: Thu Dec 16 13:30:16 EST 2010 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ Sorry about the confusion. By the way, does the phrase “This plugin has 0 goal:” give a hint to the problem? Perhaps I don’t understand the difference between goal prefixes and goals. Thanks, Dan -----Original Message----- From: Wayne Fay [mailto:[email protected]] Sent: Thursday, December 16, 2010 12:56 PM To: Maven Users List Subject: Re: Maven Ant Demo > [INFO] Installing > C:\tmp\maven-user\maven-script-ant\target\hello-plugin-1.0-SNAPSHOT.jar > to C:\Documents and Settings\oldmad\.m2\repository\org\mypro > ject\plugins\hello-plugin\1.0-SNAPSHOT\hello-plugin-1.0-SNAPSHOT.jar > > > [ERROR] Could not find goal 'hello' in plugin > org.myproject.plugins:hello-plugin:2.0 among available goals -> [Help 1] It appears that you've got something wrong in your versions somewhere. You're building version 1.0-SNAPSHOT but then trying to use version 2.0. Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
