You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Benson Margulies <bi...@gmail.com> on 2010/10/27 23:21:21 UTC

Apples, anyone? Or a brief lesson in POM-ology

The following is a quick summary of some facts about the release
process and the release plugin.

What happens when you just run 'mvn'?

When you just run mvn, the default <modules/> element in the toplevel
calls for all subdirectories except 'distribution'. This allows you to
build the code and run ordinary unit tests and get new jars in your
local repository. Note, that, even in this mode of operation, the
'examples' project goes ahead and uses the assembly plugin to build
the job file.

What happens when you run mvn -Peverything?

When you add -Peverything, you add 'distribution' to the build without
adding any additional plugins. Net result? You get the big distro
archive, but you don't rebuild complete source archives or javadoc,
and you don't sign anything.

What happens when you run mvn -Pfastinstall?

When you activate the fastinstall profile, you turn off unit tests,
checkstyle, and PMD.

What happens when you run mvn -Prelease?

When you add -Prelease, you activate the 'release' plugin in the
top-level POM. It adds the 'distribution' directory to the build, and
it turns on additional plugins: source, javadoc, and gpg. Once you
turn on gpg, it will want a key and a passphrase for the key. You can
either have a profile in your settings.xml for that, or you can call
it mahout_release and add that to the command line, which is
recommended.

What happens when you run mvn release:prepare?

The job of release:prepare is to do the following:

1: edit all the POMs to change the versions from xxx-SNAPSHOT to xxx,
and make corresponding changes to scm paths.
2: check in the results.
3: make a tag in svn by cp'ing from the revision with the modified poms.
4: edit all the POMs to change the versions to xxx+1-SNAPSHOT and make
corresponding changes to the scm paths.
5: check in the results.

That's it. So, you do NOT want -Prelease when running release:prepare.
You do need -Peverything, otherwise it won't operate on
'distribution'. Further, fastinstall has the happy result of speeding
this up, considerably.

What happens when you run mvn release:perform?

The job of release:perform is:

1: check out from the tag to a directory in target
2: run mvn deploy in there, adding arguments to the mvn command as
specified in the configuration of the release plugin in the toplevel
POM.

The Mahout POM specifies that release:perform will add in the profiles
'release' and 'mahout_release'. So, you get full source archives,
javadoc, and everything gets signed.