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.

Setting Up Your Environment

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.

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:

<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:

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:

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

You also need to be a member of the group apcvs on people.apache.org.

Due to a bug in Maven there may be problems with the file permissions on the server after a snapshot has been published. Please read this page on how to fix your own files.

If someone else has not cleaned up after themselves you can run these commands on the shell to fix it. Important: don't run it all in one batch, as it uses the -f flag for rm. Make sure the files have been copied before you remove them.

cp maven-metadata.xml maven-metadata.xml.bak
cp maven-metadata.xml.md5 maven-metadata.xml.md5.bak
cp maven-metadata.xml.sha1 maven-metadata.xml.sha1.bak
chmod 664 maven-metadata.xml*.bak
# Stop here and check that the files have been copied and that the copies have the correct permissions
rm -f maven-metadata.xml
rm -f maven-metadata.xml.md5
rm -f maven-metadata.xml.sha1
mv maven-metadata.xml.bak maven-metadata.xml
mv maven-metadata.xml.md5.bak maven-metadata.xml.md5
mv maven-metadata.xml.sha1.bak maven-metadata.xml.sha1

Publishing websites

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

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

You also need to be a member of the group maven on people.apache.org.

When publishing plugin docs, be sure to activate the reporting profile with -P reporting.

Publishing schemas

To publish a schema, first generate it, then scp it to people.apache.org.

/svn/maven/components/maven-model
$ mvn modello:xsd
...
$ scp  target/generated-site/xsd/maven-4.0.0.xsd  people.apache.org:/www/maven.apache.org/xsd/

The schemas should be published to http://maven.apache.org/xsd/

The schemas currently in /www/maven.apache.org are:

These files should be removed, and symlinks added to the actual files in /xsd.

See: http://www.nabble.com/Publishing-schemas-t2566129s177.html for discussion