That did it. Thanks so much!

Wendy Smoak wrote:
On 3/21/07, Rod Mclaughlin <[EMAIL PROTECTED]> wrote:
I copied the pom file from
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.0.2/
(and the md5's and sha's for the pom and the jar) into
~/.m2/repository/org/apache/maven/plugins/maven-war-plugin/2.0.2/
but still mvn install says
'The plugin 'org.apache.maven.plugins:maven-war-plugin' does not exist
or no valid version could be found'

For plugins, Maven also needs the maven-metadata-[repo-id].xml files
in the local repository.  (The repo-id is usually "central".)  There
should be one at the level of the groupId and another at the level of
the plugin itself.

I am connected to the internet, and as you say, Maven should
automatically install the plugin. But it doesn't.

Try deleting ~/.m2/repository/org/apache/maven/plugins/maven-war-plugin
to get rid of your manually installed files.  Then build again while
you're online.  If that doesn't work, post the error message and
exactly what you typed.

If the metadata file was originally written when you weren't online,
it will be missing version information, and you'll get the 'no valid
version' message.

I can reproduce this by deleting the metadata for maven-clean-plugin
and then running:
  $ mvn clean -o

This will will write a metadata file containing only
<?xml version="1.0" encoding="UTF-8" ?>
 <metadata>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-clean-plugin</artifactId>
 </metadata>

Subsequent executions of "mvn clean" will fail with 'no valid version'
until you either delete the metadata file *or* run with -U on the
command line to force an update.

mvn clean -U

Deleting the plugin from your local repository to force Maven to
download it again is also an option.



--
Rod McLaughlin
[EMAIL PROTECTED]
.m2/repository/org/omnimedix/mclaughlin/rod/1.0-SNAPSHOT/rod-1.0-SNAPSHOT.jar


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

Reply via email to