Skip to content

Building EclipseLink

Radek Felcman edited this page Dec 19, 2019 · 18 revisions

This is a guide for new users to build EclipseLink locally

Table of Contents

EclipseLink 3.0+

Prerequisite steps:

  • Set up EclipseLink
  • (optional) Set up local database to run tests on. In this case except DB installation, is required to prepare test properties file in user home directory. It's possible copy some file from project. See: buildsystem/mavenize/test.properties directory.

Test property files from there are used if there is no any in user home directory (default DB connection and JEE server settings). File names are e.g. el-test.mysql.properties for MySQL, el-test.oracle.properties for Oracle DB. Test property file has properties like db.url, db.user, db.pwd..... to describe connection to the testing DB. Property file from user home directory has higher priority, that file in buildsystem/mavenize/test.properties directory.

Note: This required because Oracle JDBC driver isn't available in Maven Central.

  • (optional) Server side testing. Currently there is support for WildFly 15.0.1.Final, GlassFish 5.1 and Oracle WebLogic 12.2.1 (must be installed manually). WildFly and GlassFish are installed automatically during Maven build (server tests). Default installation directory for JEE servers is ~/.eclipselinktests (must be created).
  • (optional) Set up local WebLogic (download)

Required tools:

Default developer build

mvn install

performs the build and runs SRG tests on inmemory Apache Derby DB

Default developer build (without tests)

mvn install -DskipTests

performs the build without tests and without Oracle modules

Default build with LRG tests (MySQL)

mvn verify -Pmysql,test-lrg

performs the build including source and javadoc bundles and runs LRG tests on local Mysql DB without server side tests.

Server side tests (MySQL, WildFly)

mvn verify -pl :org.eclipse.persistence.jpa.test -P server-test-jpa-lrg1,mysql

mvn verify -pl :org.eclipse.persistence.jpa.test -P server-test-jpa-lrg2,mysql

performs the JPA server side tests on local Mysql DB and WildFly.

Note: JPA Server side tests are divided into two parts due Travis timeout limit.

Test execution examples

Core LRG tests (unit + integration) against MySQL DB

mvn verify -pl :org.eclipse.persistence.core.test -P test-core-lrg,mysql

and Oracle DB

mvn verify -pl :org.eclipse.persistence.core.test -P test-core-lrg,oracle

JPA LRG tests (unit + integration) against MySQL DB

mvn verify -pl :org.eclipse.persistence.jpa.test -P test-jpa-lrg,mysql

JPA JSE LRG tests against MySQL DB

mvn verify -pl :org.eclipse.persistence.jpa.jse.test -Pmysql

All LRG tests against MySQL DB (!!takes 2-6 hours depends on machine!!)

mvn verify -Pmysql,test-lrg

Default Travis build (MySQL, WildFly)

There are multiple tests called (core, MOXy, JPA, NoSQL, server side, OSGi....). These tests can't be called in single command due limits (timeout, log output) in Travis-CI environment.

See script section in .travis.yml file.

NOTE: Every PR must pass this build before being merged to the master branch.

Oracle DB build

mvn install -Poracle

performs the build including Oracle DB specific extensions and runs SRG tests on local Oracle DB

Customized build

mvn install -P<database>,<applicationServer>,<testGroup>

where .
<database> = derby, mongo, mysql, oracle .
<applicationServer> = glassfish, weblogic, wildfly .
<testGroup> = test-srg, test-lrg

notable system properties:
-Dtest.properties.file=/path/to/someDB.properties - custom database server related properties .
-Dtestjee.properties.file=/path/to/someAS.properties - custom application server related properties .
-Ddb.driver.groupId=..., -Ddb.driver.artifactId=..., -Ddb.driver.version=... - Maven coordinates of custom JDBC driver .

See default property files in the repository for more details about the content of property files.

EclipseLink 2.x

build instructions for older versions can be found @ https://wiki.eclipse.org/EclipseLink/Building#Build

To install built artifacts into local maven repository, run full build using ant -f antbuild.xml build-distribution and then install artifacts by running:

ant -f uploadToNexus.xml -DsnapshotId=local -DsnapshotURL=file:///path/to/m2-repo \
 -Drelease.version=3.0.0 -Dbuild.type=SNAPSHOT -Dgit.hash=local \
 -Dmavenant.dir=/folder/with/maven-ant-tasks-2.1.3.jar -Dversion.string=3.0.0.qualifier
Clone this wiki locally