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/Maven"

(81 intermediate revisions by 7 users not shown)
Line 1: Line 1:
== Location ==
+
<div style="float:right;width:300px"><div align="center" style="background:#ffffff;width:275px">
 +
__TOC__
 +
</div> </div>
 +
As of the 2.5.0 release, EclipseLink is available on [http://search.maven.org/#search|ga|1|org.eclipse.persistence Maven Central]. In addition, the EclipseLink project hosts its nightly, milestone, and release builds on [https://oss.sonatype.org/index.html#nexus-search;gav~org.eclipse.persistence Sonatype]. As of the 2.5.1 patch set (September 2013), builds will no longer be published to the download.eclipse.org Maven repository.
  
The use of the Eclipse mirrors for Maven repositories has been reported to cause varying issues from artifacts being reported as unavailable to local maven repository corruption. Therefore, instead of using the mirrored download URL:
+
If you have any questions about using it, or experience problems, please let us know on our users mailing list or forum.
* http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo
+
== Configuring your pom.xml  ==
it is recommended that you use the unmirrored URL to directly access the EclipseLink Maven repository on the Eclipse download site instead:  
+
 
* http://download.eclipse.org/rt/eclipselink/maven.repo
+
To help users diagnose Maven issues, we have created a basic POM that simply establishes EclipseLink dependencies (currenly using the 2.5.0 release). Executing it will verify your connection to the repository. Alternate Repository URLs are discussed. The POM can be found [[http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/pom.xml here]].  
 +
 
 +
=== Repositories ===
 +
 
 +
Prior to the 2.5.0 release, you will need to specify the EclipseLink repository (in a <repositories> block) wthin your pom.xml. In addition, SNAPSHOT and Milestone builds would need a repository entry.
 +
 
 +
==== oss.sonatype.org: 2.4.2 and Later ====
 +
 
 +
The EclipseLink project has switched to publishing its builds through oss.sonatype org during the 2.4.2/2.5.0 development. The staging repo will provide access to SNAPSHOT and named milestone and release candidate builds. To access these use:
 +
 
 +
<source lang="xml">
 +
<repository>
 +
<id>oss.sonatype.org</id>
 +
<name>OSS Sonatype Staging</name>
 +
<url>https://oss.sonatype.org/content/groups/staging</url>
 +
</repository>
 +
</source>
 +
 
 +
When the 2.4.2 and above releases are finalized they will be published to [http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.eclipse.persistence%22 Maven Central] where no additional  repository configuration will be required.
 +
 
 +
==== Custom Repo: 2.4 and Earlier ====
 +
 
 +
Builds prior to EclipseLink 2.4.2 are available at:
 +
 
 +
<source lang="xml">
 +
<repository>
 +
  <id>EclipseLink</id>
 +
  <url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
 +
</repository>
 +
</source>
 +
 
 +
== <dependencies> ==
 +
 
 +
The artifacts can then be added to you pom as follows.
 +
 
 +
<source lang="xml">
 +
<dependency>
 +
  <groupId>org.eclipse.persistence</groupId>
 +
  <artifactId>{artifact}</artifactId>
 +
  <version>{version}</version>
 +
  <scope>compile</scope>
 +
</dependency>
 +
</source>
 +
 
 +
The following are the primary artifacts though artifacts do vary by release. 2.4.2 and newer artifacts can be browsed from the Maven Central or Sonatype OSS links above. While predominantly the same, artifacts in older releases and their descriptions are listed below.
  
== Identifiers ==
 
* Group Id: org.eclipse.persistence
 
  
 
{|{{BMTableStyle}}
 
{|{{BMTableStyle}}
 
|-{{BMTHStyle}}
 
|-{{BMTHStyle}}
! Artifact Id
+
! Artifact Id  
 
! Description
 
! Description
 
|-
 
|-
| eclipselink || The non OSGI EclipseLink jar
+
| eclipselink  
 +
| The full eclipselink.jar (non-OSGi) including the full capabilities of all of the following artifact bundles and fragments.
 
|-
 
|-
| org.eclipse.persistence.core || OSGI-enabled EclipseLink core bundle  
+
| org.eclipse.persistence.jpa
 +
| EclipseLink JPA (OSGi bundle): Use this artifact if you only want EclipseLink's JPA capabilities for relational databases. If accessing an Oracle database then you will also want the '''org.eclipse.persistence.oracle''' artifact.
 
|-
 
|-
| org.eclipse.persistence.jpa || OSGI-enabled EclipseLink JPA bundle
+
| org.eclipse.persistence.moxy
 +
| EclipseLink MOXy (OSGi bundle): Use this artifact if you only want EclipseLink's Object-XML binding and JAXB implementation. This also includes JSON binding support.
 
|-
 
|-
| org.eclipse.persistence.moxy || OSGI-enabled EclipseLink MOXY bundle
+
| org.eclipse.persistence.nosql
 +
| EclipseLink NoSQL (OSGi fragment): Provides NoSQL support extending org.eclipse.persistence.core.
 
|-
 
|-
| org.eclipse.persistence.sdo || OSGI-enabled EclipseLink SDO bundle
+
| org.eclipse.persistence.oracle
 +
| EclipseLink JPA for Oracle (OSGi fragment): Extended Oracle database capabilities extending the core bundle with specific Oracle JDBC dependencies.
 
|-
 
|-
| org.eclipse.persistence.asm || OSGI-enabled EclipseLink ASM bundle
+
| org.eclipse.persistence.oracle.nosql
|-
+
| EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle.
| org.eclipse.persistence.antlr || OSGI-enabled EclipseLink ANTLR bundle
+
|-
+
| org.eclipse.persistence.oracle || OSGI-enabled EclipseLink bundle with Oracle-DB specific extensions
+
 
|-
 
|-
| javax.persistence || EclipseLink version of the javax.persistence classes (OSGi enabled)
+
| org.eclipse.persistence.dbws
|}
+
| EclipseLink DBWS OSGI bundle
 
+
* Runtime Dependencies (from Orbit)
+
 
+
{|{{BMTableStyle}}
+
|-{{BMTHStyle}}
+
! Group Id
+
! Artifact Id
+
! Description
+
 
|-
 
|-
| commonj.sdo || commonj.sdo || OSGI-enabled SDO API bundle
+
| org.eclipse.persistence.jpa.modelgen
 +
| EclipseLink Modelgen pre-processor (non-OSGI) (pre-2.5.0)
 
|-
 
|-
| javax.activation || javax.activation || OSGI-enabled javax.activation API bundle
+
| org.eclipse.persistence.osgi
 +
| (pre-2.5.0 only)
 
|-
 
|-
| javax.mail || javax.mail || OSGI-enabled javax.mail bundle
+
| org.eclipse.persistence.sdo
 +
| EclipseLink SDO OSGI bundle
 
|-
 
|-
| javax.servlet || javax.servlet || OSGI-enabled javax.servlet bundle
+
| org.eclipse.persistence.equinox
 +
| EclipseLink JPA Equinox OSGi Fragment (pre-2.5.0 only)
 
|-
 
|-
| javax.xml.bind || javax.xml.bind || OSGI-enabled javax.xml.bind bundle
+
| org.eclipse.persistence.jpa.modelgen.processor
 +
| EclipseLink JPA Modelgen Processor (non-OSGi) (pre-2.5.0: Meta-data only. 2.5.0+: single jar contains both classes and meta-data)
 
|-
 
|-
| javax.xml.stream || javax.xml.stream || OSGI-enabled javax.xml.stream bundle
+
| org.eclipse.persistence.oracleddlparser
 +
| Oracle DB model - OSGi bundle
 +
|-
 +
| org.eclipse.persistence.weaving
 +
| EclipseLink JPA - "Weaving for Equinox" OSGi Fragment (pre-2.5.0 only)
 
|}
 
|}
  
 +
== Versions  ==
  
=== What bundles should I get ===
+
For the available EclipseLink release versions please refer to [http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.eclipse.persistence%22 Maven Central] or [https://oss.sonatype.org/index.html#nexus-search;quick~org.eclipse.persistence Sonatype OSS]. For access to nightly or milestone builds please see [https://oss.sonatype.org/index.html#nexus-search;quick~org.eclipse.persistence Sonatype OSS].
 
+
The following lists what you should get based on your needs
+
 
+
==== Full functionality - non OSGI ====
+
 
+
This is the recommended way of getting EclipseLink unless you are using OSGi, or you want to explicitly exclude certain parts of EclipseLink
+
 
+
* eclipselink
+
* javax.persistence (optional - only needed if you are using JPA outside of a Java EE container)
+
 
+
==== JPA Only ====
+
 
+
* JPA
+
* Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* javax.persistence
+
* Oracle (optional - only needed to access Oracle DB specific functionality)
+
 
+
==== MOXy Only ====
+
 
+
* MOXy
+
* Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
 
+
==== SDO Only ====
+
 
+
* SDO
+
* MOXy
+
* Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
 
+
==== Core Only ====
+
 
+
* Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
* Oracle (optional - only needed to access Oracle DB specific functionality)
+
 
+
== Versioning ==
+
 
+
===Available Released Versions===
+
 
+
* 2.2.0
+
* 2.1.2
+
* 2.1.1
+
* 2.1.0
+
* 2.0.2
+
* 2.0.1
+
* 2.0.0
+
** JPA 2.0 Implementation release
+
* 1.2.0
+
* 1.1.4
+
** final 1.1.x patchset
+
* 1.1.3
+
* 1.1.2
+
** Eclipse Galileo Release
+
* 1.1.1
+
* 1.1.0
+
* 1.0.2
+
* 1.0.1
+
* 1.0
+
 
+
NOTE: javax.persistence (JPA 2.0) has been released as version 2.0.0, 2.0.1, 2.0.2, and 2.0.3
+
 
+
===Releases Under development===
+
 
+
* 2.3.0
+
* 2.2.1
+
* 2.1.3
+
* 2.0.3
+
* 1.2.1
+
 
+
''Under development releases have the following additional naming conventions''
+
 
+
* <releaseNumber>-SNAPSHOT (The most recent nightly build e.g. 2.1.0-SNAPSHOT)
+
* <releaseNumber>-Mx (For milestones, replace x with the milestone number e.g. 2.0.0-M1)
+
* <releaseNumber>-RCx (For release candidates, replace x with the release candidate number e.g. 2.0.0-RC1)
+
 
+
== Sample pom.xml entries ==
+
 
+
<pre>
+
  
<dependencies>
+
== Sample pom.xml (Staging) ==
  <dependency>
+
    <groupId>org.eclipse.persistence</groupId>
+
    <artifactId>eclipselink</artifactId>
+
    <version>2.0.0</version>
+
    <scope>compile</scope>
+
      ...
+
  </dependency>
+
</dependencies>
+
      ...
+
<repositories>
+
  <repository>
+
    <id>EclipseLink Repo</id>
+
    <!-- note that ampersands in this URL are escaped because this is in an xml file -
+
            un-escape them to use in browser
+
    -->
+
    <url>http://www.eclipse.org/downloads/download.php?r=1&amp;amp;nf=1&amp;amp;file=/rt/eclipselink/maven.repo</url>
+
    <!-- use this for javax.persistence
+
    <snapshots>
+
        <enabled>true</enabled>
+
    </snapshots> -->
+
  </repository>   
+
      ...
+
</repositories>
+
  
</pre>
+
The following pom.xml illustrates access the EclipseLink 2.5.0-RC1 from our staging repository.
  
[[Category:EclipseLink|Maven]]
+
<source lang="xml">
 +
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 +
<modelVersion>4.0.0</modelVersion>
 +
<groupId>eclipselink.example.jpa</groupId>
 +
<artifactId>simple</artifactId>
 +
<version>2.5.0-SNAPSHOT</version>
 +
 +
<repositories>
 +
<repository>
 +
<id>oss.sonatype.org</id>
 +
<name>OSS Sonatype Staging</name>
 +
<url>https://oss.sonatype.org/content/groups/staging</url>
 +
</repository>
 +
</repositories>
 +
 +
<dependencies>
 +
<dependency>
 +
<groupId>org.eclipse.persistence</groupId>
 +
<artifactId>eclipselink</artifactId>
 +
<version>2.5.0-RC1</version>
 +
<exclusions>
 +
<exclusion>
 +
<groupId>org.eclipse.persistence</groupId>
 +
<artifactId>commonj.sdo</artifactId>
 +
</exclusion>
 +
</exclusions>
 +
</dependency>
 +
</dependencies>
 +
</project>
 +
</source>

Revision as of 14:00, 27 September 2013

As of the 2.5.0 release, EclipseLink is available on Maven Central. In addition, the EclipseLink project hosts its nightly, milestone, and release builds on Sonatype. As of the 2.5.1 patch set (September 2013), builds will no longer be published to the download.eclipse.org Maven repository.

If you have any questions about using it, or experience problems, please let us know on our users mailing list or forum.

Configuring your pom.xml

To help users diagnose Maven issues, we have created a basic POM that simply establishes EclipseLink dependencies (currenly using the 2.5.0 release). Executing it will verify your connection to the repository. Alternate Repository URLs are discussed. The POM can be found [here].

Repositories

Prior to the 2.5.0 release, you will need to specify the EclipseLink repository (in a <repositories> block) wthin your pom.xml. In addition, SNAPSHOT and Milestone builds would need a repository entry.

oss.sonatype.org: 2.4.2 and Later

The EclipseLink project has switched to publishing its builds through oss.sonatype org during the 2.4.2/2.5.0 development. The staging repo will provide access to SNAPSHOT and named milestone and release candidate builds. To access these use:

<repository>
	<id>oss.sonatype.org</id>
	<name>OSS Sonatype Staging</name>
	<url>https://oss.sonatype.org/content/groups/staging</url>
</repository>

When the 2.4.2 and above releases are finalized they will be published to Maven Central where no additional repository configuration will be required.

Custom Repo: 2.4 and Earlier

Builds prior to EclipseLink 2.4.2 are available at:

<repository>
   <id>EclipseLink</id>
   <url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
</repository>

<dependencies>

The artifacts can then be added to you pom as follows.

<dependency>
   <groupId>org.eclipse.persistence</groupId>
   <artifactId>{artifact}</artifactId>
   <version>{version}</version>
   <scope>compile</scope>
</dependency>

The following are the primary artifacts though artifacts do vary by release. 2.4.2 and newer artifacts can be browsed from the Maven Central or Sonatype OSS links above. While predominantly the same, artifacts in older releases and their descriptions are listed below.


Artifact Id Description
eclipselink The full eclipselink.jar (non-OSGi) including the full capabilities of all of the following artifact bundles and fragments.
org.eclipse.persistence.jpa EclipseLink JPA (OSGi bundle): Use this artifact if you only want EclipseLink's JPA capabilities for relational databases. If accessing an Oracle database then you will also want the org.eclipse.persistence.oracle artifact.
org.eclipse.persistence.moxy EclipseLink MOXy (OSGi bundle): Use this artifact if you only want EclipseLink's Object-XML binding and JAXB implementation. This also includes JSON binding support.
org.eclipse.persistence.nosql EclipseLink NoSQL (OSGi fragment): Provides NoSQL support extending org.eclipse.persistence.core.
org.eclipse.persistence.oracle EclipseLink JPA for Oracle (OSGi fragment): Extended Oracle database capabilities extending the core bundle with specific Oracle JDBC dependencies.
org.eclipse.persistence.oracle.nosql EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle.
org.eclipse.persistence.dbws EclipseLink DBWS OSGI bundle
org.eclipse.persistence.jpa.modelgen EclipseLink Modelgen pre-processor (non-OSGI) (pre-2.5.0)
org.eclipse.persistence.osgi (pre-2.5.0 only)
org.eclipse.persistence.sdo EclipseLink SDO OSGI bundle
org.eclipse.persistence.equinox EclipseLink JPA Equinox OSGi Fragment (pre-2.5.0 only)
org.eclipse.persistence.jpa.modelgen.processor EclipseLink JPA Modelgen Processor (non-OSGi) (pre-2.5.0: Meta-data only. 2.5.0+: single jar contains both classes and meta-data)
org.eclipse.persistence.oracleddlparser Oracle DB model - OSGi bundle
org.eclipse.persistence.weaving EclipseLink JPA - "Weaving for Equinox" OSGi Fragment (pre-2.5.0 only)

Versions

For the available EclipseLink release versions please refer to Maven Central or Sonatype OSS. For access to nightly or milestone builds please see Sonatype OSS.

Sample pom.xml (Staging)

The following pom.xml illustrates access the EclipseLink 2.5.0-RC1 from our staging repository.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>eclipselink.example.jpa</groupId>
	<artifactId>simple</artifactId>
	<version>2.5.0-SNAPSHOT</version>
 
	<repositories>
		<repository>
			<id>oss.sonatype.org</id>
			<name>OSS Sonatype Staging</name>
			<url>https://oss.sonatype.org/content/groups/staging</url>
		</repository>
	</repositories>
 
	<dependencies>
		<dependency>
			<groupId>org.eclipse.persistence</groupId>
			<artifactId>eclipselink</artifactId>
			<version>2.5.0-RC1</version>
			<exclusions>
				<exclusion>
					<groupId>org.eclipse.persistence</groupId>
					<artifactId>commonj.sdo</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>
</project>

Back to the top