2007-04-03 00:19:30 -04:00
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to you under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
|
|
Building OpenJPA
|
|
|
|
===============================================================================
|
|
|
|
|
|
|
|
These instructions describe how to build OpenJPA from source code using the
|
2010-01-25 09:34:51 -05:00
|
|
|
Apache Maven 2 build tool. They are written for use from the console, and are
|
2007-04-03 00:19:30 -04:00
|
|
|
known to work on Linux and Mac OSX. They are also reported to work from Windows.
|
|
|
|
|
|
|
|
The most up to date version of these instructions may be found on the OpenJPA
|
2007-08-14 18:39:55 -04:00
|
|
|
website at http://openjpa.apache.org/building-openjpa.html
|
2007-04-03 00:19:30 -04:00
|
|
|
|
2010-02-24 11:15:48 -05:00
|
|
|
1. Ensure that Java SE 6 is installed and on your path by running:
|
2009-10-07 14:47:55 -04:00
|
|
|
java -version
|
2010-02-24 11:15:48 -05:00
|
|
|
OpenJPA requires Java 1.6 or later to build, but still supports using
|
|
|
|
Java SE 5 for runtime even though some features are only available
|
2010-01-25 09:34:51 -05:00
|
|
|
with Java SE 6.
|
2009-10-07 14:47:55 -04:00
|
|
|
2. Install the build tool Apache Maven 2.0.9 or later, from:
|
|
|
|
http://maven.apache.org/
|
2007-04-03 00:19:30 -04:00
|
|
|
If it is installed correctly, typing mvn -v from the console will result
|
2009-10-07 14:47:55 -04:00
|
|
|
in the text "Maven version: 2.0.9"
|
2007-04-03 00:19:30 -04:00
|
|
|
3. Extract the source archive if you have not already done so.
|
|
|
|
The source will create a new directory named:
|
2008-06-11 20:01:46 -04:00
|
|
|
openjpa-<version>-source. Where <version> is the openjpa
|
2009-10-07 14:47:55 -04:00
|
|
|
version, for example apache-openjpa-2.0.0-source.
|
2007-04-03 00:19:30 -04:00
|
|
|
4. Change to the openjpa source directory, which has already been created in
|
|
|
|
the previous step.
|
|
|
|
5. 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.html)
|
|
|
|
|
|
|
|
<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:
|
2008-06-11 20:01:46 -04:00
|
|
|
mvn package -DskipTests
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
An example session as as follows:
|
|
|
|
|
|
|
|
$ cd /tmp/
|
|
|
|
|
|
|
|
$ java -version
|
2010-02-24 11:15:48 -05:00
|
|
|
java version "1.6.0_17"
|
|
|
|
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
|
|
|
|
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
$ mvn -v
|
2009-10-07 14:47:55 -04:00
|
|
|
Maven version: 2.0.10
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
$ svn --version
|
2009-10-07 14:47:55 -04:00
|
|
|
svn, version 1.5.5 (r34862)
|
|
|
|
compiled Jan 5 2009, 12:30:39
|
2007-04-03 00:19:30 -04:00
|
|
|
|
2007-08-14 18:39:55 -04:00
|
|
|
$ svn co https://svn.apache.org/repos/asf/openjpa/trunk/
|
2007-04-03 00:19:30 -04:00
|
|
|
A trunk/openjpa-lib
|
|
|
|
A trunk/openjpa-lib/src
|
|
|
|
A trunk/openjpa-lib/src/test
|
|
|
|
A trunk/openjpa-lib/src/test/java
|
|
|
|
A trunk/openjpa-lib/src/test/java/org
|
|
|
|
A trunk/openjpa-lib/src/test/java/org/apache
|
|
|
|
A trunk/openjpa-lib/src/test/java/org/apache/openjpa
|
|
|
|
A trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib
|
|
|
|
A trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/test
|
|
|
|
A trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/test/AbstractTestCase.
|
|
|
|
java
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
A trunk/openjpa-persistence/pom.xml
|
2010-02-24 11:15:48 -05:00
|
|
|
Checked out revision 915725.
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
$ cd trunk/
|
|
|
|
|
2009-10-07 14:47:55 -04:00
|
|
|
$ mvn clean install -DfailIfNoTests=false -Dtest=
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
[INFO] Scanning for projects...
|
|
|
|
[INFO] Reactor build order:
|
2009-10-07 14:47:55 -04:00
|
|
|
[INFO] OpenJPA Parent POM
|
|
|
|
[INFO] OpenJPA Utilities Library
|
|
|
|
[INFO] OpenJPA Kernel
|
|
|
|
[INFO] OpenJPA JDBC
|
|
|
|
[INFO] OpenJPA Persistence
|
|
|
|
[INFO] OpenJPA Persistence JDBC
|
|
|
|
[INFO] OpenJPA Persistence Locking Tests
|
|
|
|
[INFO] OpenJPA XML Store
|
|
|
|
[INFO] OpenJPA Slice
|
|
|
|
[INFO] OpenJPA Aggregate Jar
|
|
|
|
[INFO] OpenJPA Aggregate Jar with Dependencies
|
|
|
|
[INFO] OpenJPA Project Docs and Assemblies
|
|
|
|
[INFO] OpenJPA Examples
|
|
|
|
[INFO] OpenJPA Integration Tests
|
|
|
|
[INFO] OpenJPA Integration Tests - Examples
|
|
|
|
[INFO] OpenJPA Integration Tests - JPA TCK
|
|
|
|
[INFO] OpenJPA Integration Tests - Bean Validation
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
|
|
|
[INFO] Building OpenJPA Parent POM
|
|
|
|
[INFO] task-segment: [clean, install]
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
2007-04-03 00:19:30 -04:00
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
[INFO]
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
|
|
|
[INFO] Reactor Summary:
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
2010-02-24 11:15:48 -05:00
|
|
|
[INFO] OpenJPA Parent POM .................................... SUCCESS [8.999s]
|
|
|
|
[INFO] OpenJPA Utilities Library ............................. SUCCESS [22.600s]
|
|
|
|
[INFO] OpenJPA Kernel ........................................ SUCCESS [26.888s]
|
|
|
|
[INFO] OpenJPA JDBC .......................................... SUCCESS [13.231s]
|
|
|
|
[INFO] OpenJPA Persistence ................................... SUCCESS [8.635s]
|
|
|
|
[INFO] OpenJPA Persistence JDBC .............................. SUCCESS [1:33.5s]
|
|
|
|
[INFO] OpenJPA Persistence Locking Tests ..................... SUCCESS [3.857s]
|
|
|
|
[INFO] OpenJPA XML Store ..................................... SUCCESS [1.294s]
|
|
|
|
[INFO] OpenJPA Slice ......................................... SUCCESS [3.779s]
|
|
|
|
[INFO] OpenJPA Aggregate Jar ................................. SUCCESS [21.544s]
|
|
|
|
[INFO] OpenJPA Aggregate Jar with Dependencies ............... SUCCESS [8.322s]
|
|
|
|
[INFO] OpenJPA Project Docs and Assemblies ................... SUCCESS [1:12.6s]
|
|
|
|
[INFO] OpenJPA Examples ...................................... SUCCESS [1.049s]
|
|
|
|
[INFO] OpenJPA Integration Tests ............................. SUCCESS [0.341s]
|
|
|
|
[INFO] OpenJPA Integration Tests - Examples .................. SUCCESS [0.278s]
|
|
|
|
[INFO] OpenJPA Integration Tests - JPA TCK ................... SUCCESS [0.229s]
|
|
|
|
[INFO] OpenJPA Integration Tests - Bean Validation ........... SUCCESS [4.028s]
|
2007-04-03 00:19:30 -04:00
|
|
|
[INFO] ------------------------------------------------------------------------
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
|
|
|
[INFO] BUILD SUCCESSFUL
|
|
|
|
[INFO] ------------------------------------------------------------------------
|
2010-02-24 11:15:48 -05:00
|
|
|
[INFO] Total time: 4 minutes 56 seconds
|
|
|
|
[INFO] Finished at: Wed Feb 24 09:01:40 EST 2010
|
|
|
|
[INFO] Final Memory: 110M/376M
|
2007-04-03 00:19:30 -04:00
|
|
|
[INFO] ------------------------------------------------------------------------
|
|
|
|
|
2009-10-07 14:47:55 -04:00
|
|
|
$ ls openjpa-project/target/site/downloads/
|
2007-04-03 00:19:30 -04:00
|
|
|
|
2009-10-07 14:47:55 -04:00
|
|
|
apache-openjpa-2.0.0-SNAPSHOT-binary.zip
|
|
|
|
apache-openjpa-2.0.0-SNAPSHOT-source.zip
|
2007-04-03 00:19:30 -04:00
|
|
|
|