|
Page Edited :
DIRxSRVx11 :
0.2. Building trunks
0.2. Building trunks has been edited by Emmanuel Lécharny (May 26, 2009). Change summary: Update the build page
This page give some information about the layout of Apache DS 1.5 trunks, and try to explain how it is built. Project HierarchyThe actual project hierarchy is the following (as of 1.5.5-SNAPSHOT) :
Prerequisites for buildingYou must have installed Maven 2.0.9 and have a JDK 5 installed on your computer. A working internet connection is also mandatory. MavenDownload Add a MAVEN_HOME environment variable and add MAVEN_HOME/bin to your system path: On a Linux box you could add the following to the .bashrc file (.bashrc is a file you'll find in your home directory) ... export MAVEN_HOME=/opt/maven-2.0.9 export PATH=$JAVA_HOME:$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH ... Windows users, use Control Panel -> System -> Advanced -> Environment Variables JDK 5
Getting the codeTo download the sources, you must have installed a Subversion client. With readonly access : svn co http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies/ apacheds-trunk With read/write access (for committers only) : svn co https://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies/ apacheds-trunk Building the trunksEnabling Snapshot Repositories
You may either specify the profile at the command-line, each time you use 'mvn', or you may configure the profile to always be active. To use a profile at the command-line: # mvn -Papache [options] [<goal(s)>] [<phase(s)>] To specify the 'apache' profile to always be active: <settings>
...
<activeProfiles>
<activeProfile>apache</activeProfile>
</activeProfiles>
...
</settings>
Building the trunksNow, we can compile the project. The command is simple : cd apacheds-trunk mvn clean install
A lot of plugins will be downloaded. If you are curious, you can then look at .m2/repository to see what has been downloaded on this step. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8 minutes 30 seconds [INFO] Finished at: Mon Oct 30 23:32:41 CET 2006 [INFO] Final Memory: 18M/32M [INFO] ------------------------------------------------------------------------
Building the installersBuilding the installers is a two phase process : cd apacheds-trunk mvn install cd installers/apacheds mvn -Pserver-installer install That's it, the jars will be find in target/images/apacheds-1.5.? Starting the server without installationThe directory apacheds-trunk/installers/apacheds-noarch contains a script for Linux (apacheds.sh) and one for Windows (apacheds.bat) which can be used for starting the server without the need to install it first (as non-root-user on Linux and non-Windows-service on Windows). Linux: cd apacheds-trunk/installers/apacheds-noarch ./apacheds.sh Integration testTo run integration tests, just use the following command : cd apacheds-trunk mvn -Dintegration test EclipseBuilding eclipse filesTo build the .project and .classpath files for eclipse, type the following commands : cd apacheds-trunk mvn clean install mvn eclipse:eclipse cd apacheds/bootstrap-partition mvn clean install (The last command is necessary because eclipse:eclipse purge the target directory, and we need some generated files which has been removed. This is why we do another *mvn clean installù in the boostrap-partition module Maven settingsDon't forget to declare a classpath variable named M2_REPO, pointing to ~/.m2/repository, otherwise many links to existing jars will be broken. Eclipse hintsAdd an eclipse-apacheDS.sh file in your eclipse root directory, to allow eclipse to get more memory (e.g. 750MB) <eclipse_root>/eclipse -data $HOME/workspace-apacheDS -vm java -vmargs -Xmx750M Launch eclipse : <eclipse_root>/eclipse-apacheDS.sh Eclipse pluginsCoding standardsThe coding standards including an eclipse code formatting profile is available here. |