Using Maven versions earlier than 2.0.9
Due to MNG-2261 which causes problems locating plugins when you are in a directory with no pom.xml, an additional step is necessary for Maven versions earlier than 2.0.9 to have Maven download the necessary tools for you. Create an empty directory, download this pom.xml in there, and run "mvn package". This bootstrap pom trick will download a bunch of artifacts into your local repository. $ cd /tmp $ wget https://hudson.dev.java.net/source/browse/*checkout*/hudson/trunk/hudson/tools/bootstrap/pom.xml $ mvn package install $ rm pom.xml Also, if your Maven has trouble resolving artifacts, consider adding the following entries to your ~/.m2/settings.xml too. This is a crude way to cause Maven to look at the java.net m2 repository all the time for artifact resolutions. <settings>
...
<profiles>
...
<profile>
<id>hudson</id>
...
<repositories>
...
<repository>
<id>java.net2</id>
<url>http://download.java.net/maven/2</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
|
