TOOL SETUP

This document describes how to set up the general development environment for aixcept OpenSource projects. You only need to do these setps if you want to help out on any of the OpenSource projects as either contributor or developer.

Subversion

The source code of the aixcept OpenSource projects is managed in a Subversion repository. See the Source Repository page for more information about how to check out the code.

For non-anonymous access to the repository, you need an developer account with username and password. You also need access rights on the particular repository.

Maven

The aixcept OpenSource projects use the Maven2 build tool for managing builds and compiling artifacts. Make sure you have the correct version of Maven (currently 2.0.8) installed and configured on your system. You can get the latest Maven2 Release from the Maven homepage.

Download and install Maven 2.0.8 from http://maven.apache.org/download.jspa.

Windows 2000/XP

1. Unzip maven-2.0.8-bin.zip to the directory you wish to install Maven 2.0.8. These instructions assume you chose C:\Program Files\Apache Software Foundation\maven-2.0.8

2. Add the bin directory to your path, by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then editing the PATH variable in the user variables. eg. "C:\Program Files\Apache Software Foundation\maven-2.0.8\bin";%PATH%

3. In the same dialog, make sure that JAVA_HOME is set to the location of your JDK, eg. C:\Program Files\Java\jdk1.5.0_02

4. Run mvn --version to verify that it is correctly installed.

Unix-based Operating Systems (Linux, Solaris and Mac OS X)

1. Extract the distribution archive to the directory you wish to install Maven 2.0.8. These instructions assume you chose /usr/local/maven-2.0.8. The directory maven-2.0.8 will be created from the archive.

2. Add the bin directory to your path, eg. export PATH=/usr/local/maven-2.0.8/bin:$PATH

3. Make sure that JAVA_HOME is set to the location of your JDK, eg. export JAVA_HOME=/usr/java/jdk1.5.0_02

4. Run mvn --version to verify that it is correctly installed.

Create a MAVEN_OPTS environment variable and set its value to:

 -Xms256M -Xmx1024M

In addition to the official Maven repository, the aixcept OpenSource projects also use the aixcept Maven repository. This repository is already configured in the pom.xml, so no additional configuration steps have to be made. Using

 mvn

downloads all dependencies to your local repository. See the Maven HOWTO page for more information about using Maven2 within aixcept OpenSource projects.

If you need to publish site or artifacts, you need to add the following servers to the Maven2 settings (/.m2/settings.xml):

    <server>
        <id>aixcept-repo</id>
        <username>$USERNAME</username>
        <privateKey>$PATH_TO_PRIVATE_KEY</privateKey>
    </server>
    <server>
        <id>aixcept-snapshots</id>
        <username>$USERNAME</username>
        <privateKey>$PATH_TO_PRIVATE_KEY</privateKey>
    </server>
    <server>
        <id>PROJECT_SITE_ID</id>
        <username>$USERNAME</username>
        <privateKey>$PATH_TO_PRIVATE_KEY</privateKey>
    </server>

IntelliJ IDEA 6.0+

For development, using IntelliJ IDEA as IDE is highly recommended.

You can create the IntelliJ IDEA project configuration files with the following command:

 mvn idea:clean idea:idea

After opening your project in IDEA, you may need to modify your Project JDK.

Recreating the IntelliJ IDEA configuration files is only necessary, when new dependencies have been added to or were removed from the project.

Eclipse 3.2+

As an alternative for developing the Flex Annotation project, you may want to check out Eclipse.

The Eclipse project configuration is generated by using the command:

 mvn eclipse:clean eclipse:eclipse -DdownloadSources=true

Maven is downloading all dependencies to your local Maven2 repository. Wait for Maven to complete the download, this may take several minutes.

Eclipse needs to know the path to the local maven repository. Therefore the classpath variable M2_REPO has to be set. Execute the following command:

  mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo

You can also define the M2_REPO classpath variable inside Eclipse.

From the menu bar, select Window > Preferences. Select the Java > Build Path > Classpath Variables page.

Add a new one with a name of M2_REPO and Path of to your local Maven repository (/Users//.m2/repository on OS X and C:\Documents and Settings${username}\.m2\repository on Windows).

For easy working with Maven from Eclipse, have a look at the M2Eclipse Plugin here: http://m2eclipse.codehaus.org/

Recreating the Eclipse project is only necessary, when new dependencies have have been added to or were removed from the project.