OpenXRI:SettingUpBuildEnvironment

From I-names Development Wiki

Jump to: navigation, search

Contents

Requirements

The OpenXRI source base is mostly self contained. The only requirement is JDK 1.5.

Make sure your JDK is installed and that

  • you have set your JAVA_HOME environment variable
  • $JAVA_HOME/bin is in your path

Building with Maven

OpenXRI uses Apache Maven for building.

To build distribution files from source distribution or from a svn checkout:

  1. Make sure you hava Java 1.5.x installed, JAVA_HOME set, and $JAVA_HOME/bin in path
  2. Make sure you have Maven 2.0.7+ installed, M2_HOME set, and $M2_HOME/bin in path
  3. cd to the root of the sources (where this document is)
  4. mvn install

After that the OpenXRI Maven artifacts will be installed in your local Maven repository, and the OpenXRI binaries will be assembled in a subdirectory named dist/.

Setting up Eclipse

1. Installing Eclipse

If you do not have Eclipse installed, download it here: http://www.eclipse.org/downloads/ . If your version of Eclipse is older than 3.0, you may want to consider upgrading. The rest of the section was written according to the behavior of Eclipse 3.3, your version may behave differently.

2. Installing Subclipse

The subclipse plug-in brings Subversion functionality right into your Eclipse, and we recommend you to use it (make it that much easier for you to contribute code to the project :)

Installation instructions can be found here: http://subclipse.tigris.org/install.html

3. Installing M2 Plug-in

OpenXRI can use Maven to build your project. Installing the M2 plug-in will make your life easier.

Installation instructions can be found here: http://m2eclipse.codehaus.org/ There is even a screen cast to show you how to do it at http://m2eclipse.codehaus.org/Installing_Maven_2.0_plugin_for_Eclipse.html

4. Checking Out the Sources

  1. File -> New -> Project...
  2. In the New Project wizard, select SVN -> Checkout Projects from SVN, click Next.
  3. Select "Create a new repository location", Next.
  4. Enter the following in the "Url" field: https://openxri.svn.sourceforge.net/svnroot/openxri
  5. If you get an "Unknown certificate issuer", it is because the Equifax CA is either not in Eclipse or JDK. You can verify the cert fingerprint by going to the same URL using your browser and viewing the certificate information. If you're satisfied, click "Accept Temporarily" or "Accept Permanently".
  6. Expand the repository and select openxri4j -> trunk
  7. Select "check out as a project in the workspace" and name it openxri4j. Keep the "Head Revision" selected. Click Finish.
  1. Right click on openxri4j -> Build Path -> Configure Build Path
  2. Under Java Build Path on the left pane, go to the Libraries tab
  3. Click on "Add Library"
  4. Select "JRE System Library", click Next.
  5. Leave as Workspace default JRE, click Finish.
  6. Click OK to close the "Configure Build Path" dialog.

5. Enable Maven

  1. When the source code is checked out, right click on the openxri4j project and select Maven2 -> Enable
  2. Maven2 will start downloading the dependencies.