Even after wiping out my settings.xml, I still get this error when trying to use this snapshot dependency. Given the dependency:
I rechecked and, with the following pom fragments:
...
Codehaus Snapshots
http://snapshots.repository.codehaus.org/
true
true
...
my-webapp
...
org.codehaus.mojo
tomcat-maven-plugin
1.0-SNAPSHOT
...
...
The SNAPSHOT of the plugin has been downloaded successfully:
$ mvn clean [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building my-webapp Maven Webapp [INFO] task-segment: [clean] [INFO] ------------------------------------------------------------------------ [INFO] snapshot org.codehaus.mojo:tomcat-maven-plugin:1.0-SNAPSHOT: checking for updates from Codehaus Snapshots [INFO] snapshot org.codehaus.mojo:tomcat-maven-plugin:1.0-SNAPSHOT: checking for updates from maven2-repository.dev.java.net Downloading: http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/tomcat-maven-plugin-1.0-20091222.232027-11.pom 5K downloaded (tomcat-maven-plugin-1.0-20091222.232027-11.pom) Downloading: http://snapshots.repository.codehaus.org//org/codehaus/mojo/tomcat-maven-plugin/1.0-SNAPSHOT/tomcat-maven-plugin-1.0-20091222.232027-11.jar 48K downloaded (tomcat-maven-plugin-1.0-20091222.232027-11.jar) [INFO] [clean:clean {execution: default-clean}] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9 seconds [INFO] Finished at: Wed Jan 06 16:13:28 CET 2010 [INFO] Final Memory: 7M/78M [INFO] ------------------------------------------------------------------------
It's very weird because I can't see any difference, but things are working as expected. In other words, I can't reproduce...
In your local repository, do you have maven-metadata*.xml
files in the 1.0-SNAPSHOT directory for the tomcat-maven-plugin artifact? Do they match the ones on the remote server? Do they correctly specify the build number and timestamp?
If they are incorrect locally, running maven with -U
might help.
You might also check mvn help:effective-pom
and see what Maven thinks the updatePolicy
is for snapshots on that repository.
Or maybe just delete your tomcat-maven-plugin artifact from your local repository and try again.
If nothing helps, try to install it manually (download the plugin from the repository and use the mvn install:install-file
mojo) or checkout the sources from the VCS and build it locally. But these options are just workarounds, you have a problem somewhere (what version of maven are you using?).