DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| No Format |
|---|
$ cd /tmp/ $ java -version java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) $ mvn -v Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0 Java home: /alt/sun160/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.18-1.2798.fc6" arch: "i386" Family: "unix" $ svn --version svn, version 1.4.3 (r23084) compiled Jan 18 2007, 07:47:40 $ svn co https://svn.apache.org/repos/asf/openjpa/trunk/ 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 Checked out revision 9491781065345. $ cd trunk/ $ mvn compile [INFO] Scanning for projects... [INFO] Reactor build order: [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 JEST [INFO] OpenJPA Aggregate Jar [INFO] OpenJPA Aggregate Jar with Dependencies [INFO] OpenJPA Project Docs and Assemblies [INFO] OpenJPA Examples [INFO] OpenJPA Examples - Simple [INFO] OpenJPA Examples - image-gallery [INFO] OpenJPA Examples - OpenBooks [INFO] OpenJPA Integration Tests [INFO] OpenJPA Integration Tests - Daytrader [INFO] OpenJPA Integration Tests - Examples [INFO] OpenJPA Integration Tests - SLF4JLogFactory [INFO] OpenJPA Integration Tests - JPA TCK [INFO] OpenJPA Integration Tests - Bean Validation [INFO] OpenJPA Integration Tests - JMX Platform MBeans [INFO] ------------------------------------------------------------------------ [INFO] Building OpenJPA Parent POM [INFO] task-segment: [compile] [INFO] ------------------------------------------------------------------------ ... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] OpenJPA Parent POM .................................... SUCCESS [41:23.114s143s] [INFO] OpenJPA Utilities Library ............................. SUCCESS [613.684s749s] [INFO] OpenJPA Kernel ........................................ SUCCESS [2319.840s251s] [INFO] OpenJPA JDBC .......................................... SUCCESS [2014.248s351s] [INFO] OpenJPA Persistence ................................... SUCCESS [810.421s254s] [INFO] OpenJPA Persistence JDBC .............................. SUCCESS [1246.656s774s] [INFO] OpenJPA Persistence Locking Tests ..................... SUCCESS [015.243s183s] [INFO] OpenJPA XML Store ..................................... SUCCESS [211.060s788s] [INFO] OpenJPA Slice ......................................... SUCCESS [34.184s437s] [INFO] OpenJPA Aggregate Jar JEST .......................................... SUCCESS [04.274s854s] [INFO] OpenJPA Aggregate Jar with Dependencies .................. SUCCESS [0.105s] [............... SUCCESS [10.729s] [INFO] OpenJPA Aggregate Jar with Dependencies ............... SUCCESS [6.761s] [INFO] OpenJPA Project Docs and Assemblies ................... SUCCESS [01:41.293s937s] [INFO] OpenJPA Examples ...................................... SUCCESS [10.896s663s] [INFO] OpenJPA Examples Integration- TestsSimple ............................. SUCCESS [1.475s] [INFO] OpenJPA Examples - image-gallery ...................... SUCCESS [3.920s] [INFO] OpenJPA Examples - OpenBooks .......................... SUCCESS [12.961s] [INFO] OpenJPA Integration Tests ............................. SUCCESS [0.381s] [INFO] OpenJPA Integration Tests - Daytrader ................. SUCCESS [7.565s] [INFO] OpenJPA Integration Tests - Examples ....................... SUCCESS [0.055s269s] [INFO] OpenJPA Integration Tests - DaytraderSLF4JLogFactory ................. SUCCESS [01.109s977s] [INFO] OpenJPA Integration Tests - ExamplesJPA TCK ................... SUCCESS [0.628s248s] [INFO] OpenJPA Integration Tests - JPABean TCKValidation ................... SUCCESS [03.053s213s] [INFO] OpenJPA Integration Tests - JMX BeanPlatform ValidationMBeans ........... SUCCESS [07.272s729s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16 minuteminutes 2726 seconds [INFO] Finished at: FriSun MayJan 2830 1519:5843:1450 CESTCET 20102011 [INFO] Final Memory: 46M92M/63M158M [INFO] ------------------------------------------------------------------------ $ mvn package -DskipTests [INFO] Scanning for projects... ... [INFO] Building zip: /tmp/trunk/openjpa-project/target/site/downloads/apache-openjpa-2.12.0-SNAPSHOT-binary.zip ... $ ls -lh openjpa-project/target/site/downloads/ total 34M40M -rw-r--r-- 1 milosz milosz 12M15M MayJan 2830 1619:0641 apache-openjpa-2.12.0-SNAPSHOT-binary.zip -rw-r--r-- 1 milosz milosz 22M25M MayJan 2830 1619:0743 apache-openjpa-2.12.0-SNAPSHOT-source.zip |
Executing various Maven build tasks
...
- Checkout the source as described above
- Build the source using Maven as described above
- Create the Eclipse Metadata -
No Format mvn eclipse:eclipse
- If this is the first project in your workspace to use maven artifacts you need to create a classpath variable named M2_REPO which contains the full path to your local repository. The eclipse plugin can do this for you with the following command
No Format mvn eclipse:configure-workspace -Declipse.workspace=${path to your workspace}
- If this is the first project in your workspace to use maven artifacts you need to create a classpath variable named M2_REPO which contains the full path to your local repository. The eclipse plugin can do this for you with the following command
- Start Eclipse (3.2 - 3.4 SR2 are known to work) and create a new workspace
- Import the OpenJPA projects, by:
- Select File --> Import... --> General - Existing Projects into Workspace --> Next
- Select root directory = <svn checkout location above>
- Deselect the openjpa-examples project
- Press Finish
- 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
- For each imported project, you'll need to edit the build properties to remove an incorrect dependency:
- Project --> Properties --> Java Build Path --> Source
- Remove openjpa-project from the list of source folders
For Java SE 5 users building from the 2.0.x branch, you will need to exclude some Java SE 6 specific classes by performing the following steps for the trunk source:
- Open the Properties for openjpa-persistence
- Select Java Build Path --> Source
- Edit the openjpa-persistence/src/main/java --> Excluded setting to include the following:
No Format org/apache/openjpa/persistence/meta/AnnotationProcessor6.java org/apache/openjpa/persistence/meta/CompileTimeLogger.java org/apache/openjpa/persistence/meta/SourceAnnotationHandler.java
...
- 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
Wiki Markup 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.
- 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. This will probably get cleared up soon since Eclipse 3.5 is still quite new.
- 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
For Java SE 5 users building from the 2.0.x branch, you will need to exclude some Java SE 6 specific classes by performing the following steps for the trunk source:
- Open the Properties for TRUNKBR20-openjpa-persistence (or whatever your naming convention is)
- Select Java Build Path --> Source
- Edit the openjpa-persistence/src/main/java --> Excluded setting to include the following:
No Format org/apache/openjpa/persistence/meta/AnnotationProcessor6.java org/apache/openjpa/persistence/meta/CompileTimeLogger.java org/apache/openjpa/persistence/meta/SourceAnnotationHandler.java
Common 2.
...
x Build Problems
Wrong Maven Level
Example Maven output -
...
Solution - either add the missing ASL 2.0 license header, remove the file from your local working directory (if it is a temp temporary file that should not be added to svn), or ask on the dev@openjpa list if the file can be added to the exclude list for the apache-rat checks.
...