Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Building"

m (Migrating Eclipse Projects to PDE as of 20080430)
(Migrating Eclipse Projects to PDE as of 20080430)
Line 98: Line 98:
 
**Note: if db.platform is not set in your <user-home>/test.properties then you may get a "ClassNotFoundException: ${db.platform}" - set this variable as follows (using your own platform)
 
**Note: if db.platform is not set in your <user-home>/test.properties then you may get a "ClassNotFoundException: ${db.platform}" - set this variable as follows (using your own platform)
 
***db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform
 
***db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform
***Normally we do not set a dependecy on the platform though - this will be fixed shortly in our script.
+
**Normally we do not set a dependecy on the platform though - this will be fixed shortly in our script.
 
<pre>
 
<pre>
 
     [junit] Tests run: 911, Failures: 0, Errors: 1, Time elapsed: 583.35 sec
 
     [junit] Tests run: 911, Failures: 0, Errors: 1, Time elapsed: 583.35 sec

Revision as of 14:55, 5 May 2008



Licensing Issues

We are still sorting through some licensing issues for some of the libraries we depend on and upgrading code to use libraries that are EPL compliant. In the mean time, you may be able to use the following information to build the various projects.

SVN Structure

At the moment, all code can be found in the org.eclipse.persistence/trunk directory on the technology SVN server. The following directories are designed to be compilable sub-components of EclipseLink. They each contain an src directory and potentially a resource directory that the files necessary for building and running.

Runtime

  • foundation/org.eclipse.persistence.core - the core of EclipseLink
  • foundation/eclipselink.extension.oracle - extensions that require Oracle-specific libraries for compilation. You will not be able to build these extensions until some of the licensing issues have been sorted out. The compiled classes will be checked in soon so that people without those dependancies can use the compiled classes.
  • jpa/org.eclipse.persistence.jpa - EclipseLink's JPA support
  • foundation/eclipselink.core.lib - this will contain all the libraries the core depends on to build.

Testing

Note: Before testing in Eclipse using the Testing Browser - you will need to a full root build of EclipseLink in 'trunk>ant' so that the test jars eclipse*model.jar get created and placed on the root of jpa/eclipselink.jpa.test. Please refresh your eclipselink.jpa.test project to pick these up before running the Testing Browser eclipse launch target.

  • foundation/eclipselink.core.test - the core testing for EclipseLink
  • foundation/eclipselink.extension.oracle.test - the testing for EclipseLink's Oracle-specific functionality. Like the extension.oracle directory, this will only build after some licensing issues have been sorted out.
  • jpa/eclipselink.jpa.test - the JPA tests for EclipseLink

Projects and Dependencies

Eclipse Projects are available for eclipselink.core, eclipselink.core.lib, eclipselink.core.test jpa, jpa.test, sdo, sdo.test, moxy and moxy.test. These projects should allow you to use most of the core EclipseLink functionality.

Until our dependencies have been checked in, you should be able to build use the following dependencies to build.

  1. org.eclipse.persistence.core depends on the following:
    1. eclipselink.core.lib - The Eclipse Project defined in this folder
  2. org.eclipse.persistence.jpa depends on the following:
    1. org.eclipse.persistence.core - The Eclipse project defined in this folder
  3. eclipselink.core.test should have all its dependencies already set but provides an ant build that sets up some xml files to run
  4. eclipselink.jpa.test should have all its dependencies already set but provides an ant build to build persistence units for testing
  5. eclipselink.extension.oracle depends on a selection of jars from Oracle products. In order to build this project you will need to obtain all these jars. As a result the class files from this project are checked in so they can be used by people that do not have those jars
    1. Jars:
      1. aqapi.jar - Oracle Advanced Queue
      2. sdoapi.jar - Oracle Spatial API
      3. An oracle JDBC driver
      4. xdb.jar - XDB
      5. xml.jar - Oracle XML support
      6. xmlparserv2.jar - Oracle XML parser
    2. Projects
      1. eclipselink.core depends on the same jars as foundation/extension.oracle and as a result, it has also had class files checked in
  6. eclipselink.extension.oracle.test depends on
    1. eclipselink.extension.oracle
    2. eclipselink.core.test
    3. org.eclipse.persistence.jpa
  7. org.eclipse.persistence.moxy depends on the following:
    1. org.eclipse.persistence.core
  8. eclipselink.moxy.test depends on the following:
    1. org.eclipse.persistence.moxy
    2. org.eclipse.persistence.core
    3. Eclipse Library JUnit 3 - this is already configured, but there have been issues with Eclipse version 3.2 where the library needs to be reselected in order for JUnit to be picked up properly.
  9. eclipselink.sdo depends on the following:
    1. org.eclipse.persistence.core
    2. eclipselink.core.lib
  10. eclipselink.sdo.test depends on the following:
    1. org.eclipse.persistence.sdo
    2. org.eclipse.persistence.core
    3. TOOLS_LIB variable has been mapped to your JDK tools.jar for a runtime dependency
    4. Eclipse Library JUnit 3 - this is already configured, but there have been issues with Eclipse version 3.2 where the library needs to be reselected in order for JUnit to be picked up properly.

Migrating Eclipse Projects to PDE as of 20080430

There is a new PDE structure being finalized that will require a rebuild of all existing EclipseLink projects in Eclipse. See [EclipseLink/Development/EclipseLinkPDEConversionPlan http://wiki.eclipse.org/EclipseLink/Development/EclipseLinkPDEConversionPlan]

These notes will be incorporated into the main doc and formalized when this process is complete.

  • Prerequisites
    • Remove any existing eclipselink.* projects
    • Keep existing classpath variables
  • Importing Projects
    • Import | General | Existing projects into Workspace
      • root directory = <trunk>/lib
      • Leave "Copy projects into workspace" unselected
      • select all of javax.* and org.*
    • Import foundation projects in the same way
    • Import jpa projects in the same way
    • Refresh/Rebuild
      • If automatic build is not checked - check it and clean all projects
    • core dependency on jpa lib project
      • see javax.persistence;bundle-version="1.99.0";visibility:=reexport in the core project
      • If you get a compile error on javax.persistence it is because we are referencing the 1.99 version instead of 1.0 in the manifest of org.eclipse.persistence.core - make sure the jpa project javax.persistence.1.99 is loaded in your workspace.
  • Building
    • Run ant at the <trunk> root so that all the test project jars are updated and built
BUILD SUCCESSFUL
Total time: 8 minutes 4 seconds
C:\view_w34>
  • Running
    • Test the build by running test.jpa
    • <trunk>/ant test.jpa
    • Note: if db.platform is not set in your <user-home>/test.properties then you may get a "ClassNotFoundException: ${db.platform}" - set this variable as follows (using your own platform)
      • db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform
    • Normally we do not set a dependecy on the platform though - this will be fixed shortly in our script.
    [junit] Tests run: 911, Failures: 0, Errors: 1, Time elapsed: 583.35 sec
Total time: 10 minutes 4 seconds
C:\view_w34>
    • See the following (I get 1 error locally that can be ignored)

C:\view_w34\jpa\eclipselink.jpa.test\reports\junit-noframes.html

  • Refresh eclipse workspace to optionally run the testing browser targets

Port TODO List

List of task, items, issues, refactorig left to due from the initial port.

  • Get all tests passing. - JPA JUnit tests and legacy LRG model currently pass
  • Move left-over internal classes to internal packages.
  • Internationalization.
  • Server tests.
  • Sun Corba and RMI-IIOP - are these elements still required in EclipseLink. If so, make sure tests work. Else, remove.
  • Make all server platforms work. i.e. address the fact that they all need to be reflective to compile

How To

Back to the top