On 28/02/2008, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On Thu, Feb 28, 2008 at 9:02 AM, Andrew Birchall > <[EMAIL PROTECTED]> wrote: > > > I wish to use the latest archetype plugin, 2.0-alpha-2 (I think that's > > the latest, although one's never quite sure in the mysterious world of > > Maven!) > > > Are you following the announcements mailing list? The plugins page > also has versions listed: http://maven.apache.org/plugins/index.html > > What could we do better? [Archetype is perhaps not our best example > right now, the documentation does not exactly match the release.]
The plugins page has the version listed as 2.0-alpha-1. So there you go - you could do better there. Its these little things that cause confusion and a sense of doubt. > > > > However when I run mvn archetype:genearte it uses the 1.0-alpha-4 > > version and subsequently can't find this goal. > > > > Even if I delete this plugin from my local repository maven still > > downloads the 1.0-alpha-4 version and attempts to use that. (Note: not > > even the 1.0-alpha-7 version!) > > > How did you delete it? You'll need to delete the entire > maven-archetype-plugin directory including the metadata and all the > versions. > My mistake. I was deleting the entire archetype directory, but the wrong one. I was deleting \.m2\repository\org\apache\maven\archetype instead of \.m2\repository\org\apache\maven\plugins\maven-archetype-plugin > > > The documentation states that the default behaviour of Maven is to use > > the latest version of a plugin. > > > > How can I get Maven to download and use the latest archetype > automatically? > > > It should Just Work. 2.0-alpha-2 is in the central repo and the > maven-metadata.xml correctly lists that version as the latest: > > http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/ > > Are you using a mirror or an internal repository? If so, check the > metadata file, it may be incorrect. > No I'm using the main central reposiitory not a mirror or an internal repoistory. > To force it, use the version number on the command line. Something like: > > mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-2:create ... > I ran it with the -U switch, i.e. mvn -U archtype:generate and it updated to the latest plugin. Thanks for your help. Andy > > -- > Wendy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
