]> &project; Filip Hanik Apache Tomcat - Using Tomcat libraries with Maven
Tomcat snapshots are located in the Apache Snapshot Repository. The official URL is http://people.apache.org/repo/m2-snapshot-repository/org/apache/tomcat/
Snapshots are done periodically, not on a regular basis, but when changes happen and the Tomcat team deams a new snapshot might useful.
At every release, be it alpha, beta or stable, we will publish the JARs to Tomcat's Staging Repository. The URL for this is http://tomcat.apache.org/dev/dist/m2-repository/org/apache/tomcat/.
We are also publishing all requested Tomcat JARs to the ibiblio mirror at ASF.
Almost everything you need is in the res/maven directory.
Basically the publish is done using ANT, and Maven's ANT tasks. Getting Maven to play well with the SCP protocol can be somewhat of a daunting task so I have tried to explain all the steps here.
Step 1
Make sure you have the following installed:
ANT 1.6.5 or later
Maven 2.0.6
JDK 1.5
And then make sure you have the res/maven directory checked out.
Step 2
Download the Maven ANT tasks, due to a delayed release, I've created a patched version so make sure you download the PATCH as well.
Store both these files in the res/maven directory.
Step 3
At this point you are ready to rock and roll. Change any properties in the maven.properties.default file, or simply create a file named maven.properties where you can override any properties you need.
To publish a release do ant -f mvn-pub.xml deploy-release
To publish a to a staging repo do ant -f mvn-pub.xml deploy-staging
and to publish snapshots do ant -f mvn-pub.xml deploy-snapshot

The next section describes all the steps I had to take to get everything to work publishing from a Windows box. Some of these steps can be skipped on Unix as the SSH handling works better there.
Getting SCP to work with private/public key authentication
1. on a linux box execute 'ssh-keygen -t rsa'
2. same linux box execute 'cat id_rsa.pub >> authorized_keys' and 'cat id_rsa.pub >> authorized_keys2'
3. Copy id_rsa and id_rsa.pub to my windows box
4. Import id_rsa into puttygen
5. export id_rsa from puttygen to OpenSSH key
6. The key you exported from puttygen is the one you reference from the <privateKey> element
7. Manually create the %USERPROFILE%\.ssh directory
8. Manually add the %USERPROFILE%\.ssh\known_hosts file with the entry for the host that you are accessing
Some of this has been described in this article.