Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

  1. Ensure that you have Java installed and in your path by running: java -fullversion
  2. Install the build tool, Apache Maven 2.2.1 or later, from http://maven.apache.org/Image Removed. If it is installed correctly, typing mvn -v from the console will result in text like Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
  3. Install Subversion v1.4.x or newer from http://subversion.apache.org/Image Removed. If it is installed correctly, typing the following command should output help information: svn help or svn --version
  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/openjpa/trunkImage Removed openjpa-trunk. It will check out the sources to the openjpa-trunk directory. More information on checking out the OpenJPA sources can be found on the Source Code page.
  6. Change to the openjpa-trunk 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)
Code Block
xml
xml
<settings>
    <mirrors>
        <mirror>
            <id>repo.mergere.com</id>
            <url>http://repo.mergere.com/maven2</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>
</settings>

...

  1. Checkout the source as described above
  2. Build the source using Maven as described above
  3. Start Eclipse (3.5 Galileo is recommended) and create a new workspace
  4. Good references for this M2Eclipse plugin (need to install the plugin into your Eclipse environment)
  5. Import the OpenJPA projects, by:
    • Select File --> Import... --> General -> Maven Projects --> Next
    • Select root directory = <svn checkout location above>
    • All of the pom.xml files should be pre-selected for the svn checkout location
    • Wiki MarkupYou can affect the naming convention used for the generated Eclipse projects (one for each Maven module). Click on Advanced and fill in the Name Template field. I prefer "TRUNK-\[artifactId\]" since it helps with workspace organization, but it's your choice.
    • Press Finish
    • Note: You may get a popup internal error at the end of this Import processing. Not sure what the problem is, but it doesn't seem to affect the usage.
  6. A few fixups will be required to remove the errors that exist in the imported projects...
    • openjpa-kernel -> Properties -> Java Build Path -> Source -> Add Folders
      • add target/generated-sources/javacc
    • openjpa-jdbc -> Properties -> Java Build Path -> Libraries -> JRE System Library -> Edit
      • change this to a Java 6 JRE to remove these errors (see below if you can not use Java SE 6)
    • openjpa-persistence -> Properties -> Java Build Path -> Libraries -> JRE System Library -> Edit
      • change this to a Java 6 JRE to remove these errors (see below if you can not use Java SE 6)
    • openjpa-persistence-jdbc -> Properties -> Java Build Path -> Libraries -> JRE System Library -> Edit
      • change this to a Java 6 JRE to remove these errors (see below if you can not use Java SE 6)
    • openjpa-examples. Open up src/main/java and select ReverseMapping folder. Right mouse click.
      • Select Build Path -> Exclude

...