Developer Guide
Table of Contents
Building MINAYou need Subversion $ svn co https://svn.apache.org/repos/asf/mina/branches/1.0/ mina $ cd mina $ mvn clean install # Build packages (JARs) for the core API and other extensions and install them to the local Maven repository. $ mvn site # Generate reports (JavaDoc and JXR) $ mvn assembly:assembly # Generate a tarball $ mvn eclipse:eclipse # Generate Eclipse project files if you want Eclipse users: There are also other branches that might interest you:
If you want to check out the source code of previous releases, you could try: Coding ConventionWe follow Sun's standard Java coding convention SVN tags in headerFor having nice headers with revisions tags like : /** * @version $Rev: 529576 $, $Date: 2007-04-17 14:25:07 +0200 (mar., 17 avr. 2007) $ */ You need to set SVN properties on the files. Everything is explained there : Working with Multiple Branches in One Eclipse WorkspaceJust running mvn eclipse:eclipse won't allow you to import MINA projects from more than one branches into one Eclipse workspace. You have to rename all project names in the generated .project and .classpath files to do that. Maven Eclipse plugin should provide an option that appends the version number to the project name, but this issue $ svn co https://svn.apache.org/repos/asf/mina/all/ mina $ cd mina/branches/1.0 $ mvn-eclipse $ cd ../1.1 $ mvn-eclipse $ cd ../../trunk $ mvn-eclipse Then mvn eclipse:eclipse command is executed internally, and the branch name will be appended to all sub-module project files generated by Maven Eclipse plugin. Deploying Snapshots (Commiters Only)Before running Maven to deploy artifacts, please make sure if your umask is configured correctly. Unless configured properly, other committers will experience annoying 'permission denied' errors. If your default shell is bash, please update your umask setting in the ~/.bashrc file (create one if it doesn't exist.) by adding the following line: umask 002 Please note that you have to edit the correct shrc file. If you use csh, then you will have to edit ~/.cshrc file. Now you are ready to deploy the artifacts if you configured your umask correctly. $ svn co https://svn.apache.org/repos/asf/mina/branches/1.0 mina $ cd mina $ mvn clean deploy site site:deploy # Make sure to run 'clean' goal first to prevent side effects from your IDE. Please double-check the mode (i.e. 0664 or -rw-rw-r--, a.k.a permission code) of the deployed artifacts, otherwise you can waste other people's time significantly. Releasing a Point Release (Committers Only)Before starting be sure to have the java and mvn command in your PATH. $ type mvn mvn is hached (/opt/java/maven/bin/mvn) $ type java java is /opt/java/jdk1.6.0_01/bin/java Step 1: Tagging and DeployingFirst you need to configure mavan for using the good username for scp and operation. In the ~/.m2/settings.xml you need the following lines : <settings> <servers> <!-- secured repo --> <server> <id>apache.snapshots</id> <username>apacheusername</username> </server> <server> <id>apache.websites</id> <username>apacheusername</username> </server> <server> <id>apache.releases</id> <username>apacheusername</username> </server> </servers> </settings> Run the following commands : $ svn co https://svn.apache.org/repos/asf/mina/branches/1.0 mina $ cd mina $ mvn -DdryRun=true release:prepare # Dry-run first. Answer to maven question, most of time default value are ok, except for :
Then you can do in real with the following commands : $ mvn release:clean # Clean up the temporary files created by the dry-run. $ mvn release:prepare # Copy to tags directory. $ mvn release:clean # Clean up the temporary files. $ cd <TMP_DIR> $ svn co [https://svn.apache.org/repos/asf/mina/tags/1.0.x] mina $ cd mina $ mvn deploy $ cd .. $ rm \-fr mina Step 2: PGP Signing the Repository ContentDeployed artifacts are located at scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-sync-repository/org/apache/mina/. Please download the deployed artifacts and related maven-metadata.xml files, PGP-sign it, and upload the signatures (*.asc files).
# Download the updated files.
$ ssh people.apache.org
[minotaur] $ cd /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/
[minotaur] $ tar cnvf ~/mina-changes.tar mina
[minotaur] $ find mina -mtime 1 -exec tar rnvf ~/mina-changes.tar "{}" ";"
[minotaur] $ rm -f bsdtar.core
[minotaur] $ exit
$ scp people.apache.org:mina-changes.tar mina-changes.tar
# Sign the updated files.
$ tar xvf mina-changes.tar
$ cp -R mina mina-signed
$ cd mina-signed
$ find . -name "*.asc" -exec rm "{}" ";" # Just in case you deployed more than once today
$ gpg-sign-all
# Create the patch for the signature.
$ cd ..
$ diff -urN mina mina-signed > mina-changes.diff
# Upload the signature files.
$ scp mina-changes.diff people.apache.org:mina-changes.diff
$ ssh people.apache.org
[minotaur] $ cd /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/mina
[minotaur] $ patch -p1 < ~/mina-changes.diff
[minotaur] $ find . -name "*.orig" -exec rm "{}" ";"
[minotaur] $ exit
# Remove the temporary files.
$ rm -fr mina mina-signed mina-changes.*
$ ssh people.apache.org "rm -f mina-changes.*"
Step 3: Building Tarballs and Bzballs$ svn co https://svn.apache.org/repos/asf/mina/tags/<version> mina $ cd mina $ mvn clean package site assembly:assembly Generated distributions are located at mina/target directory. Step 4: PGP Signing the Distributions and UploadingThe distributions you generated at the Step 3 must be PGP-signed before uploaded. Please PGP Sign them, and upload them to scp://people.apache.org/www/www.apache.org/dist/mina/<version>/. gpg-sign-all $ cd target $ tar ztvf mina-1.0.x.tar.gz | grep -q docs/ # Make sure reports are generated and included. (Must print '0') $ echo $? 0 # Remove the temporary files. $ rm -fr archive-tmp site # Sign and upload the files. $ gpg-sign-all $ ssh people.apache.org mkdir /www/www.apache.org/dist/mina/1.0.x $ scp mina-* people.apache.org:/www/www.apache.org/dist/mina/1.0.x Step 5: Deploy Web Reports (JavaDoc and JXR)$ svn co https://svn.apache.org/repos/asf/mina/tags/<version> mina $ cd mina $ mvn clean compile site site:deploy Step 6: Wait 24 hoursWe have to wait at least 24 hours for all mirrors to retrieve the uploaded files before making any announcement. I'd recommend you to wait for 48 hours because some mirrors might lag due to various issues. Step 7: Update the Links in Web SiteUpdate the links to new distributions in Downloads page. Step 8: Update related metadata file(s)Update any related metadata file(s) Step 9: Wait another 24 hoursWe need to wait until any changes made in the web site and metadata file(s) go live. Step 10: Announce the New ReleaseAn announcement message can be sent to announce@apache.org Creating a New Release BranchWhen you create a new branch, you have to make sure the sections that specifies branch version numbers are configured appropriately in the root pom.xml. ... <version>1.1.0-SNAPSHOT</version> ... <scm> <connection>scm:svn:http://svn.apache.org/repos/asf/mina/branches/1.1</connection> <url>http://svn.apache.org/viewvc/directory/mina/branches/1.1</url> <developerConnection>scm:svn:https://svn.apache.org/repos/asf/mina/branches/1.1</developerConnection> </scm> ... <distributionManagement> <site> <id>apache.websites</id> <url>scp://people.apache.org/www/mina.apache.org/report/1.1/</url> </site> </distributionManagement> ... Please note that the example above is for branches/1.1. For example, you have to replace branches/1.1 with branches/3.0 if the version number of the new branch is 3.0. In case of trunk, it's just trunk rather than branches/<version>. |