Edit this page

Building Apache Directory Studio (Maven)

All projects use maven as default build tool, we use Maven 2.0.9 on JDK 1.5.

Checkout Sources from SVN Repository

First you have to download the source code from the repository. Subversion is used for version control, so you can use the subversion client to download up to date source code. Here are the steps to have a running Apache Directory Studio from scratch:

To check out the active development branch of Apache Directory Studio and all co-projects run the following command (use https intead of http for commiters):

svn co http://svn.apache.org/repos/asf/directory/studio/trunk studio

Build Maven Plugin

Now, change to studio:

cd studio

Change again to studio-plugin:

cd studio-plugin

Run the following command to build the Studio Plugin for Maven (needed to build Apache Directory Studio):

mvn clean install

When the command ends successfully, go back one level

cd ..

Build Apache Directory Studio

Run the following command to build all the Apache Directory Studio Eclipse plugins and RCP application:

mvn clean install
If the build hangs or you get an out of memory exception please increase the heap space:
  • For Linux:
    MAVEN_OPTS="-Xmx256m" mvn clean install
    
  • For Windows:
    SET MAVEN_OPTS="-Xmx256m"
    mvn clean install
    
By default a distribution for your current working OS is build. You can add additional distributions by adding the corresponding profile of it:
OS os.family os.arch maven profile to use
Mac OSX (Mac/Carbon) mac i386 -Pmacosx
Windows windows x86 -Pwin32
Linux (PPC/GTK 2) unix ppc -Plinux-ppc
Linux (x86/GTK 2) unix i386 -Plinux-x86
Linux (x86_64/GTK 2) unix amd64 -Plinux-x86_64
Warning: Work in progress
  • Windows amd64 (e.g. Vista) is only supported for SDK/RCP >= 3.4
  • Any other combinations of OS/Platform is not yet supported

After the command ends running successfully you'll have all the projects compiled and the distribution(s) of Apache Directory Studio application generated in the directory target/distributions.
To run the application, double-click on it.

Run Integration Tests

Before running integration you need a local installation of Eclipse. Further you need to declare a Maven property eclipse-home that points to the Eclipse installation. Create or edit the <home>/.m2/settings.xml file and add the following content, please adapt the path to your local eclipse installation:

<settings>
  <profiles>
    <profile>
      <id>eclipse-home</id>
      <properties>
        <eclipse-home>/opt/eclipse-3.3.1.1-gtk-64/eclipse</eclipse-home>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>eclipse-home</activeProfile>
  </activeProfiles>
</settings>

Run the following command to execute the integration tests:

mvn -Pintegration-core,integration-ui test

Build User Documentation

To build the user documentation in HTML and PDF, run the following command:

mvn install -Puserguides
Generating PDF requires much memory. If you get an out of memory exception please increase the heap memory:
  • For Linux:
    MAVEN_OPTS="-Xmx256M" mvn install -Puserguides
    
  • For Windows:
    SET MAVEN_OPTS="-Xmx256M"
    mvn install -Puserguides
    

After the command ends running successfully you'll have all the user documentation generated in the directory target/userguides.

Cleanup

To clean the project's directory, run the following command:

mvn clean

Misc

If you have problems building the projects please try to clean your local maven2 repository:
  • For Linux:
    rm -rf ~/.m2/repository
    
  • For Windows: Delete the folder C:\Documents and Settings\<your username>\.m2\repository

Note: Each sub-project can also be built separately. To do so, enter the project directory and run the mvn install command. This will compile and generate the plugin in the target directory
Note 2: Apache Directory Studio can be built on Linux, Mac OS X and Windows. It has been run successfully on Linux Ubuntu, Gentoo Linux (i386/amd64), Mac OS X Tiger & Leopard and Windows XP Pro.