DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
- Ensure that you have Java installed and in your path by running:
java -fullversion - Install the build tool, Apache Maven 2.2.1 or later, from http://maven.apache.org/
. If it is installed correctly, typing mvn -vfrom the console will result in text likeApache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) - Install Subversion v1.4.x or newer from http://subversion.apache.org/
. If it is installed correctly, typing the following command should output help information: svn helporsvn --version - Create a new directory you want to do your work in, then change to that directory from the console.
- Check out the sources by running:
svn co https://svn.apache.org/repos/asf/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.
openjpa-trunk - Change to the openjpa-trunk directory, which has already been created in the previous step.
- Build OpenJPA by running:
mvn packageor bettermvn 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.xmlfile (see http://maven.apache.org/guides/mini/guide-mirror-settings.html
)
| Code Block | ||||
|---|---|---|---|---|
| ||||
<settings>
<mirrors>
<mirror>
<id>repo.mergere.com</id>
<url>http://repo.mergere.com/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
|
...
- Checkout the source as described above
- Build the source using Maven as described above
- Start Eclipse (3.5 Galileo is recommended) and create a new workspace
- Good references for this M2Eclipse plugin (need to install the plugin into your Eclipse environment)
- 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
You 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.Wiki Markup - 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.
- 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
- openjpa-kernel -> Properties -> Java Build Path -> Source -> Add Folders
...