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.]

>  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.

>  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.

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 ...

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to