The information on this page is intended for Velocity committers, not as end-user documentation.

(Note - some of the specific instructions this document are out of date now that Velocity has left Jakarta and gone TLP. In particular this applies to details on the Velocity site).

Building and Releasing the Velocity Engine

The Velocity project currently is built using Apache ant. This is the canonical build and in case of doubt, the results of this build win. While it is possible to build Velocity using Apache maven, the inherently instable nature of Maven 1.x and the not yet proven reliablity of Maven 2.x make us feel that maven is not yet 'ready' to be used as primary build tool for Velocity.

Velocity up to and including Version 1.4 uses only Apache ant as its build tool. Starting with Velocity 1.5, we will still build the actual release archives with ant but nightly builds and especially the web site located at http://velocity.apache.org/ will be built using Apache maven V1. Using Maven buys us a number of interesting reports and metrics during the build process (such as automated Changelogs, metrics, web-formatted test reports and so on).

Apache Maven uses a XML file called project.xml and a number of properties files to control its build process.

Locations and Pathes for Velocity

Purpose

File system location (on minotaur)

web location

Release location

/www/www.apache.org/dist/velocity/engine

Mirrored through the Apache mirror system, available through

http://velocity.apache.org/download.cgi

Maven repository release location

/www/www.apache.org/dist/java-repository/velocity

http://www.apache.org/dist/java-repository/velocity/

Maven repository snapshot location

/www/cvs.apache.org/repository/velocity

http://cvs.apache.org/repository/velocity/

Building the velocity site using maven

Due to the fact that deployment happens to the Apache web staging server from which the actual servers (which are velocity.apache.org) mirror the content every few hours or so, changes are not immediately visible. If you want to check whether the content arrived ok on the apache server, use the 209.237.227.195 trick (which is using the IP address and port 80 as your proxy host. Then access http://velocity.apache.org/ and you get the content directly from minotaur).

Snapshot deployment using Maven

There are two deployment repositories defined in project.properties:

# Repository for official releases
maven.repo.apache=scpexe://cvs.apache.org
maven.repo.apache.directory=/www/www.apache.org/dist/java-repository

# Repository for alpha, beta, rc releases
maven.repo.snapshot=scpexe://cvs.apache.org
maven.repo.snapshot.directory=/www/cvs.apache.org/repository/velocity

The selection of the repository happens through the maven.repo.list parameter. It defaults to the snapshot repository.

Q: Why are we using 'scpexe' and not 'scp' for deployment?

A: Because for Apache logins, according to infrastructure, we should stick to public/private key authentication to access the distribution servers. In that case, you would have to give the full path to your private key and also the passphrase (lightbulb) on the command line. E.g. like this:

 maven -Dmaven.repo.snapshot.privatekey=/home/henning/.ssh/id_dsa -Dmaven.repo.snapshot.passphrase=verysecret dist:deploy

Q: Why that? What about ssh-agent or pageant?

A: You will have to google for that answer quite a while. Here is the short answer: ssh-agent uses an unix domain-socket which cannot be accessed in pure Java. End of Story.

Q: scpexe:// does not work for me!

A: You have to add the following properties to your global (~/.build.properties on Unix) properties file:

maven.username= <your apache login>
maven.ssh.args=-o ForwardX11=false

I needed the last line to get scpexe to run on RedHat (Fedora) Linux.

Building and deploying snapshot versions using maven

After setting up your global build properties file as described above, you should be able to run the following commands:

Please note that due to a design problem in the artifact plugin of maven, the jar or distribution archive and the related POM can have (will have if you have a slow line) different time stamps. So the POMs are basically useless.

Preparing official releases using Apache Maven

As we currently build official releases with ant, this paragraph is intentionally empty. (smile)

Preparing official releases using Apache ant

Before you start

Building the release

#! /bin/bash
for i in *.tar.gz *.zip *jar; do
  gpg --default-key <your key id here> --armor --output $i.asc --detach-sig $i
done

You should now have sixteen files in that directory: A .jar, a .jar with dependencies, a .tar.gz and a .zip file. For each you must have a .md5, a .sha1 and a .asc file. If you file count is not correct, please DO NOT CONTINUE.

Uploading the release to apache.org

Now that the release is out, please let the mirrors some time to pick up the releases. In the meantime, please do the following preparations to make the release public.

Tag the release

svn copy -m 'Release <released version>' https://svn.apache.org/repos/asf/velocity/engine/trunk https://svn.apache.org/repos/asf/velocity/engine/tags/ENGINE_<released_version>

(The older tags are a bit in disarray. This will get cleaned up in the future).

Build the site docs

(This section is out of date)

<version>
  <name>1.5</name>
  <tag>ENGINE_1.5</tag>
  <id>1.5</id>
</version>

Post-upload preparations

(This section is out of date)

Build the global Apache download and announcement links

svn checkout https://svn.apache.org/repos/asf/jakarta/site jakarta-site

Announcing the release

Announcements should have your 'apache.org' email addresse as sender because the first two recipients discard everything not coming from an apache.org address. You should also use the same announcement text (or something closely resembling it) that you put into the news.xml file on the site.