Howto release via maven release plugin: | |
1 One time setup steps: | |
Windows: | |
1 Create and install a SSH key | |
1 Install PuTTY | |
2 Use PuttyGen to create a SSH key and export the key as openssh key | |
3 Use PuTTY to ssh to people.apache.org | |
4 Create a ~/.ssh folder | |
5 Use pscp your SSH public key to ~/authorized_keys | |
6 Configure putty to use your private key and save the session | |
7 Check you can login people.apache.org with your key | |
2 Install cygwin | |
1 Install CygWin | |
2 Use ssh to login to people.apache.org . This is needed to get the correct entry in your known_hosts file | |
3 Copy the known_hosts file to your $(homedir)/.ssh/ | |
Linux / Unix: | |
1 Create and install a SSH key | |
1 Install ssh ( this should be installed by default on must linux / unix systems) | |
2 Use "ssh-keygen -t dsa" to generate a new private/public key | |
3 Use ssh to login people.apache.org and add the content of "~/.ssh/id_dsa.pub" (local) to "~/.ssh/authorized_keys" (people.apache.org) | |
4 Check you can login people.apache.org via your private key | |
2 Some linux version (e.g: kubuntu 7) uses an hashed version of the known_hosts file. | |
This file is not understood by maven. So the easiest thing is to run an interactive maven command | |
using the ssh access to people.apache.org. | |
mvn deploy:deploy-file | |
\ -Durl=scp://people.apache.org/home/$(YOURHOME)/public_html/a-random-repository | |
\ -DrepositoryId=a_random.id | |
\ -Dfile=path_to_a_local_file.jar | |
\ -DgroupId=org.some.group | |
\ -DartifactId=your-artifact | |
\ -Dversion=1.0 | |
\ -Dpackaging=jar | |
This will try connecting via ssh to people.apache.org and interactively will ask you to accept the new | |
host key. | |
Run this a second time and it HAVE TO work without asking anything. If it keep asking to accept | |
the key for an unknown host you will not be able to make the release. | |
General: | |
1 Install Apache Maven 2.0.6+ and make its binary 'mvn' available on your PATH. | |
2 Create a settings.xml in your .m2 directory with the following content: | |
<settings xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<servers> | |
<server> | |
<id>people.apache.org</id> | |
<username>$(USERNAME)</username> | |
<privateKey>$(PRIVATE_KEY)</privateKey> | |
<passphrase>$(PASSPHRASE)</passphrase> | |
<directoryPermissions>775</directoryPermissions> | |
<filePermissions>644</filePermissions> | |
</server> | |
</servers> | |
<profiles> | |
<profile> | |
<id>release</id> | |
<properties> | |
<deploy.altRepository>people.apache.org::default::scp://people.apache.org/home/$(USERNAME)/public_html/staging-repository</deploy.altRepository> | |
</properties> | |
</profile> | |
</profiles> | |
</settings> | |
Replace $(USERNAME) with the username you use to login people.apache.org, $(PRIVATE_KEY) with the path to your private openssh key and $(PASSPHRASE) with your passphrase. | |
Just remove the passphrase config option if your private key is not encrypted with one. | |
2 Do the release with maven: | |
This steps will build, sign and upload the releases | |
Prepare: | |
1 Login to minotaur (people.apache.org) via ssh. | |
2 Clean up your staging-repository via: 'rm -r ~/staging-repository/org/apache/james/*' | |
If this fails, you have probally not the needed directory structure in place. Create it via: 'mkdir -p ~/staging-repository/org/apache/james/' | |
3 Copy the "old" published builds to staging-repository (this is needed to get the right meta data) via: | |
'cp -r /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/james/* ~/staging-repository/org/apache/james/' | |
General: | |
1 Move to the root folder of the project: | |
2 Use ' mvn -Plocal,release release:prepare -Dgpg.keyname=$(YOURKEYNAME) -Dgpg.passphrase=$(YOURPASSPHRASE) -Darguments="-Dgpg.keyname=$(YOURKEYNAME) -Dgpg.passphrase=$(YOURPASSPHRASE)" ' to prepare the release | |
3 Use ' mvn -Plocal,release release:perform -Dgoals=deploy -Darguments="-Dgoals=deploy" ' to finally perfom all needed steps to finish the release stuff | |
4 If the step 3 does not work try this more verbose | |
' mvn -Plocal,release release:perform -Dgoals=deploy -Dgpg.keyname=$(YOURKEYNAME) -Dgpg.passphrase=$(YOURPASSPHRASE) -Darguments="-Dgoals=deploy -Dgpg.keyname=$(YOURKEYNAME) -Dgpg.passphrase=$(YOURPASSPHRASE)" ' | |
Now all should be done the next time with only this two maven commands | |
3 Publish the release as maven artifact | |
This steps will make the artifact's aviable in maven repositories. Get sure the VOTE has passed and the release should get official | |
Publish: | |
1 Copy the artifact's the maven repo via: 'cp -r ~/staging-repository/org/apache/james/* /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/james/' | |
2 Get some coffee and wait till the artifact's get synced across the mirrors (this can take some time). | |