Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Redirect to authorative building page

Excerpt
hiddentrue

How to build OpenJPA from source

These instructions describe how to check out the current OpenJPA source code (from the Subversion source code management repository) and build it (using the Apache Maven 2 build tool). They are written for use from the console, and are known to work on Linux and Mac OSX. They are also reported to work from Windows.

  1. Ensure that you have Java 1.5 installed and in your path by running: java -version
  2. Install the build tool, Apache Maven 2.0.4, from http://maven.apache.org/Image Removed. If it is installed correctly, typing mvn -v from the console will result in the text Maven version: 2.0.4
  3. Install the SCM tool, Subversion, from http://subversion.tigris.org/Image Removed. If it installed correctly, typing the following command should output help information: svn help
  4. Create a new directory you want to do your work in, then change to that directory from the console.
  5. Check out the sources by running: svn co https://svn.apache.org/repos/asf/incubator/openjpa/trunkImage Removed openjpa. It will check out the sources to openjpa directory. More information on checking out the OpenJPA sources can be found on the SourceAccess page.
  6. Change to the openjpa directory, which has already been created in the previous step.
  7. Build OpenJPA by running: mvn package or better mvn install. The first time you run the build, many dependencies are automatically resolved and downloaded. It is common for dependency downloading to fail the first time, which will fail the build. If any of these dependency downloads fail, just re-run the command. You may also add the following to your ~/.m2/setting.xml file (see http://maven.apache.org/guides/mini/guide-mirror-settings.htmlImage Removed)
    #

...


<settings>
    <mirrors>
        <mirror>
            <id>repo.mergere.com</id>
            <url>http://repo.mergere.com/maven2</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
</settings>

If any tests fail, and you want to ignore the failures, instead run:

mvn package -Dtest=false

An example session as as follows:

...

Include Page
openjpa:Building OpenJPA
openjpa:Building OpenJPA

...