Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add info on setting up servers in settings.xml

Introduction

What is this?

This document is indended to record the development precedures used by the Maven development community.

Who is this for?

The primary audience is Maven committers.

...

To be able to build the latest SVN version of some part of Maven you will need to add some configuration on your development machine.Snapshots

Downloading snapshots

First on the agenda is to enable you to download snapshot versions from the Apache snapshot repository. Add a profile for your Apache related settings in your settings.xml like this:

Code Block
xml
xml
titleEnable snapshots snapshot downloading in settings.xml
<settings>
  ...
  <profiles>
    <profile>
      <id>apache</id>
      <repositories>
        <repository>
          <id>apache.snapshots</id>
          <url>http://people.apache.org/maven-snapshot-repository/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>apache.snapshots</id>
          <url>http://people.apache.org/maven-snapshot-repository/</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  ...
</settings>

This tells Maven where to find snapshot versions of plugins and other artifacts. To use a profile you must tell Maven that you want to use a profile and pass along the id of that profile. When invoking Maven do it like this:

Code Block
mvn -Papache <phase|goal>

If you want to read more about profiles, see this page.

Publishing snapshots

To publish a snapshot of some part of Maven you need to tell Maven what your Apache username is. This is how you do it:

Code Block
xml
xml
titleEnable snapshot publishing in settings.xml

<settings>
  ...
  <servers>
    <server>
      <username>yourApacheUsername</username>
      <id>apache.snapshots</id>
    </server>
  </servers>
  ...
</settings>

Publishing websites

To publish a website for some part of Maven you also need to tell Maven what your Apache username is. This is how you do it:

Code Block
xml
xml
titleEnable website publishing in settings.xml

<settings>
  ...
  <servers>
    <server>
      <username>yourApacheUserId</username>
      <id>apache.website</id>
    </server>
  </servers>
  ...
</settings>