Skip to end of metadata
Go to start of metadata

Using Maven versions earlier than 2.0.9

If you are building behind a HTTP proxy, you will need to use Maven 2.0.5 or newer as there is a well known bug fetching artifacts from a https:// repository via a HTTP proxy with Maven 2.0.4.

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://svn.jenkins-ci.org/trunk/hudson/tools/bootstrap/pom.xml
$ mvn package
$ 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 right m2 repository all the time for artifact resolutions.

<settings>
  ...
  <profiles>
    ...

    <profile>
      <id>jenkins</id>
      ...
      <repositories>
        ...
        <repository>
          <id>m.g.o-public</id>
          <url>http://maven.glassfish.org/content/groups/public/</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>jenkins</activeProfile>
  </activeProfiles>
</settings>
  • No labels