Jump to: navigation, search

Difference between revisions of "EclipseLink/Maven"

m
(35 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
__TOC__  
 
__TOC__  
 
</div> </div>
 
</div> </div>
The EclipseLink project currently produces a maven repository for its releases
+
The EclipseLink project currently produces a maven repository for its nightly, milestone, and release builds.
  
<div align="center">'''http://download.eclipse.org/rt/eclipselink/maven.repo'''</div>
+
<div align="center">'''https://oss.sonatype.org/content/groups/staging'''</div>
 +
 
 +
<div align="center">[https://oss.sonatype.org/index.html#nexus-search;gav~org.eclipse.persistence Browse Repo]</div>
  
 
If you have any questions about using it, or experience problems, please let us know on our users mailing list or forum.  
 
If you have any questions about using it, or experience problems, please let us know on our users mailing list or forum.  
Line 12: Line 14:
 
To help users diagnose Maven issues, we have created a basic POM that simply establishes EclipseLink dependencies (currenly using the 2.4.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]].  
 
To help users diagnose Maven issues, we have created a basic POM that simply establishes EclipseLink dependencies (currenly using the 2.4.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]].  
  
=== <repository> ===
+
=== Repositories ===
 +
 
 +
Within your pom.xml you will need to specify the EclipseLink repository (within <repositories>).
 +
 
 +
==== 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:
  
Within your pom.xml you will need to specify the EclipseLink repository using:
 
 
<source lang="xml">
 
<source lang="xml">
 
<repository>
 
<repository>
   <id>EclipseLink Repo</id>
+
<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 ====
 +
 
 +
For builds prior to EclipseLink 2.5 please use:
 +
 
 +
<source lang="xml">
 +
<repository>
 +
   <id>EclipseLink</id>
 
   <url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
 
   <url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
 
</repository>
 
</repository>
 
</source>
 
</source>
  
== Identifiers  ==
+
== <dependencies> ==
  
=== Group Id: org.eclipse.persistence  ===
+
The artifacts can then be added to you pom as follows. The complete list of available artifacts and their usage is below.
  
{|
+
<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. All listed dependencies are also included in this repository.
 +
 
 +
{|{{BMTableStyle}}
 +
|-{{BMTHStyle}}
 
! Artifact Id  
 
! Artifact Id  
 
! Description
 
! Description
 +
! Dependencies
 +
! 2.4.0 POM
 
|-
 
|-
| javax.persistence
+
| eclipselink
| EclipseLink version of the javax.persistence classes (OSGi enabled)
+
| The full eclipselink.jar (non-OSGi) including the full capabilities of all of the following artifact bundles and fragments.
 +
| javax.persistence<br/>commonj.sdo
 +
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/eclipselink/2.4.0/eclipselink-2.4.0.pom POM]
 
|-
 
|-
| org.eclipse.persistence.equinox
+
| org.eclipse.persistence.jpa
| EclipseLink JPA - Equinox OSGi Fragment
+
| 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.
 +
| javax.persistence<br/>org.eclipse.persistence.asm<br/>org.eclipse.persistence.antlr<br/>org.eclipse.persistence.jpa.jpql<br/>org.eclipse.persistence.core
 +
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.jpa/2.4.0/org.eclipse.persistence.jpa-2.4.0.pom POM]
 
|-
 
|-
| org.eclipse.persistence.jpa.modelgen.processor
+
| org.eclipse.persistence.moxy
| EclipseLink JPA Modelgen Processor (non-OSGi) (Meta-data only)
+
| 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.core
 +
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.moxy/2.4.0/org.eclipse.persistence.moxy-2.4.0.pom POM]
 
|-
 
|-
| org.eclipse.persistence.tools.oracleddl
+
| org.eclipse.persistence.nosql
| Oracle DB model - OSGi bundle
+
| EclipseLink NoSQL (OSGi fragment): Provides NoSQL support extending org.eclipse.persistence.core.
 +
| javax.persistence<br/>org.eclipse.persistence.asm<br/>org.eclipse.persistence.antlr<br/>org.eclipse.persistence.jpa.jpql<br/>org.eclipse.persistence.core<br/>
 +
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.nosql/2.4.0/org.eclipse.persistence.nosql-2.4.0.pom POM]
 
|-
 
|-
| org.eclipse.persistence.weaving
+
| org.eclipse.persistence.oracle
| EclipseLink JPA - "Weaving for Equinox" OSGi Fragment
+
| EclipseLink JPA for Oracle (OSGi fragment): Extended Oracle database capabilities extending the core bundle with specific Oracle JDBC dependencies.
 +
| javax.persistence<br/>org.eclipse.persistence.asm<br/>org.eclipse.persistence.core
 +
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.oracle/2.4.0/org.eclipse.persistence.oracle-2.4.0.pom POM]
 
|-
 
|-
| <br>
+
| org.eclipse.persistence.oracle.nosql
|-
+
| EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle.
| eclipselink
+
| javax.persistence<br/>org.eclipse.persistence.asm<br/>org.eclipse.persistence.antlr<br/>org.eclipse.persistence.jpa.jpql<br/>org.eclipse.persistence.core<br/>org.eclipse.persistence.nosql
| The non-OSGI EclipseLink jar (includes the functionality below)
+
| [http://download.eclipse.org/rt/eclipselink/maven.repo/org/eclipse/persistence/org.eclipse.persistence.oracle.nosql/2.4.0/org.eclipse.persistence.oracle.nosql-2.4.0.pom POM]
|-
+
| org.eclipse.persistence.antlr
+
| EclipseLink ANTLR OSGI bundle
+
|-
+
| org.eclipse.persistence.asm  
+
| EclipseLink ASM OSGI bundle
+
|-
+
| org.eclipse.persistence.core  
+
| EclipseLink Core OSGI bundle
+
 
|-
 
|-
 
| org.eclipse.persistence.dbws  
 
| org.eclipse.persistence.dbws  
 
| EclipseLink DBWS OSGI bundle
 
| EclipseLink DBWS OSGI bundle
|-
 
| org.eclipse.persistence.jpa
 
| EclipseLink JPA OSGI bundle
 
 
|-
 
|-
 
| org.eclipse.persistence.jpa.modelgen  
 
| org.eclipse.persistence.jpa.modelgen  
 
| EclipseLink Modelgen pre-processor (non-OSGI)
 
| EclipseLink Modelgen pre-processor (non-OSGI)
|-
 
| org.eclipse.persistence.moxy
 
| EclipseLink MOXY OSGI bundle
 
|-
 
| org.eclipse.persistence.nosql
 
| OSGI fragment of Core bundle for NoSQL support (including MongoDB)
 
|-
 
| org.eclipse.persistence.oracle
 
| OSGI fragment of Core bundle with Oracle-DB specific EclipseLink extensions
 
|-
 
| org.eclipse.persistence.oracle.nosql
 
| OSGI fragment of Core bundle for Oracle specific NoSQL support
 
 
|-
 
|-
 
| org.eclipse.persistence.osgi  
 
| org.eclipse.persistence.osgi  
Line 86: Line 106:
 
| org.eclipse.persistence.sdo  
 
| org.eclipse.persistence.sdo  
 
| EclipseLink SDO OSGI bundle
 
| EclipseLink SDO OSGI bundle
|}
 
 
=== Runtime Dependencies (from Orbit)  ===
 
 
{|
 
 
|-
 
|-
! Group Id
+
| org.eclipse.persistence.equinox
! Artifact Id
+
| EclipseLink JPA Equinox OSGi Fragment
! Description
+
 
|-
 
|-
| commonj.sdo
+
| org.eclipse.persistence.jpa.modelgen.processor
| commonj.sdo
+
| EclipseLink JPA Modelgen Processor (non-OSGi) (Meta-data only)
| OSGI-enabled SDO API bundle
+
 
|-
 
|-
| javax.activation
+
| org.eclipse.persistence.tools.oracleddl
| javax.activation
+
| Oracle DB model - OSGi bundle
| OSGI-enabled javax.activation API bundle
+
 
|-
 
|-
| javax.mail
+
| org.eclipse.persistence.weaving
| javax.mail
+
| EclipseLink JPA - "Weaving for Equinox" OSGi Fragment
| OSGI-enabled javax.mail bundle
+
|-
+
| javax.servlet
+
| javax.servlet
+
| OSGI-enabled javax.servlet bundle
+
|-
+
| javax.xml.bind
+
| javax.xml.bind
+
| OSGI-enabled javax.xml.bind bundle
+
|-
+
| javax.xml.stream
+
| javax.xml.stream
+
| OSGI-enabled javax.xml.stream bundle
+
 
|}
 
|}
  
 +
== Versions  ==
  
== What bundles should I get  ==
+
For the available EclipseLink release versions please refer to the [http://www.eclipse.org/eclipselink/releases/ releases page]. It is the 3 digit number that is used. For access to nightly or milestone builds please see [[EclipseLink/Maven/NightlyMilestones]]
  
The following lists what you should get based on your needs
+
== Sample pom.xml  (Staging) ==
  
==== Full functionality - non OSGI  ====
+
The following pom.xml illustrates access the EclipseLink 2.5.0-RC1 from our staging repository.
  
This is the recommended way of getting EclipseLink unless you are using OSGi, or you want to explicitly exclude certain parts of EclipseLink
+
<source lang="xml">
 
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
*eclipselink
+
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
*javax.persistence (optional - only needed if you are using JPA outside of a Java EE container)
+
<modelVersion>4.0.0</modelVersion>
 
+
<groupId>eclipselink.example.jpa</groupId>
==== JPA ====
+
<artifactId>simple</artifactId>
 
+
<version>2.5.0-SNAPSHOT</version>
*JPA
+
*Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<repositories>
*Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<repository>
*Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<id>oss.sonatype.org</id>
*javax.persistence
+
<name>OSS Sonatype Staging</name>
*Oracle (optional - only needed to access Oracle DB specific functionality)
+
<url>https://oss.sonatype.org/content/groups/staging</url>
 
+
</repository>
==== MOXy ====
+
</repositories>
 
+
*MOXy
+
<dependencies>
*Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<dependency>
*Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<groupId>org.eclipse.persistence</groupId>
*Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
<artifactId>eclipselink</artifactId>
 
+
<version>2.5.0-RC1</version>
===== SDO =====
+
<exclusions>
 
+
<exclusion>
*SDO
+
<groupId>org.eclipse.persistence</groupId>
*MOXy
+
<artifactId>commonj.sdo</artifactId>
*Core (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
</exclusion>
*Antlr (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
</exclusions>
*Asm (starting in 2.0.0 should be retrieved by maven dependency mechanism)
+
</dependency>
 
+
</dependencies>
== Versioning  ==
+
</project>
 
+
</source>
=== Available Released Versions ===
+
 
+
*2.4.0  
+
*2.3.3
+
*2.3.2
+
*2.3.1
+
*2.3.0  
+
*2.2.1
+
*2.2.0
+
*2.1.3
+
*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.5.0
+
*2.4.1
+
*2.3.4
+
 
+
''Under development releases have the following additional naming conventions''
+
  
*&lt;releaseNumber&gt;-SNAPSHOT (The most recent nightly build e.g. 2.1.0-SNAPSHOT)
+
== Issues With Nexus ==
*&lt;releaseNumber&gt;-Mx (For milestones, replace x with the milestone number e.g. 2.0.0-M1)
+
*&lt;releaseNumber&gt;-RCx (For release candidates, replace x with the release candidate number e.g. 2.0.0-RC1)
+
  
== Sample pom.xml entries ==
+
The current repository have some issues when used with NexusHere are some [http://wiki.eclipse.org/EclipseLink/Maven/Nexus  workarounds].
<pre>&lt;dependencies&gt;
+
  &lt;dependency&gt;
+
    &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+
    &lt;artifactId&gt;eclipselink&lt;/artifactId&gt;
+
    &lt;version&gt;2.0.0&lt;/version&gt;
+
    &lt;scope&gt;compile&lt;/scope&gt;
+
      ...
+
  &lt;/dependency&gt;
+
&lt;/dependencies&gt;
+
      ...
+
&lt;repositories&gt;
+
  &lt;repository&gt;
+
    &lt;id&gt;EclipseLink Repo&lt;/id&gt;
+
    &lt;!-- note that ampersands in this URL are escaped because this is in an xml file -
+
            un-escape them to use in browser
+
    --&gt;
+
    &lt;url&gt;http://www.eclipse.org/downloads/download.php?r=1&amp;amp;nf=1&amp;amp;file=/rt/eclipselink/maven.repo&lt;/url&gt;
+
    &lt;!-- use this for javax.persistence
+
    &lt;snapshots&gt;
+
        &lt;enabled&gt;true&lt;/enabled&gt;
+
    &lt;/snapshots&gt; --&gt;
+
  &lt;/repository&gt;   
+
      ...
+
&lt;/repositories&gt;
+
  
</pre>
 
 
[[Category:EclipseLink|Maven]]
 
[[Category:EclipseLink|Maven]]

Revision as of 14:48, 7 May 2013

The EclipseLink project currently produces a maven repository for its nightly, milestone, and release builds.

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.4.0 release). Executing it will verify your connection to the repository. Alternate Repository URLs are discussed. The POM can be found [here].

Repositories

Within your pom.xml you will need to specify the EclipseLink repository (within <repositories>).

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

For builds prior to EclipseLink 2.5 please use:

<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. The complete list of available artifacts and their usage is below.

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

The following are the primary artifacts. All listed dependencies are also included in this repository.

Artifact Id Description Dependencies 2.4.0 POM
eclipselink The full eclipselink.jar (non-OSGi) including the full capabilities of all of the following artifact bundles and fragments. javax.persistence
commonj.sdo
POM
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. javax.persistence
org.eclipse.persistence.asm
org.eclipse.persistence.antlr
org.eclipse.persistence.jpa.jpql
org.eclipse.persistence.core
POM
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.core POM
org.eclipse.persistence.nosql EclipseLink NoSQL (OSGi fragment): Provides NoSQL support extending org.eclipse.persistence.core. javax.persistence
org.eclipse.persistence.asm
org.eclipse.persistence.antlr
org.eclipse.persistence.jpa.jpql
org.eclipse.persistence.core
POM
org.eclipse.persistence.oracle EclipseLink JPA for Oracle (OSGi fragment): Extended Oracle database capabilities extending the core bundle with specific Oracle JDBC dependencies. javax.persistence
org.eclipse.persistence.asm
org.eclipse.persistence.core
POM
org.eclipse.persistence.oracle.nosql EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle. javax.persistence
org.eclipse.persistence.asm
org.eclipse.persistence.antlr
org.eclipse.persistence.jpa.jpql
org.eclipse.persistence.core
org.eclipse.persistence.nosql
POM
org.eclipse.persistence.dbws EclipseLink DBWS OSGI bundle
org.eclipse.persistence.jpa.modelgen EclipseLink Modelgen pre-processor (non-OSGI)
org.eclipse.persistence.osgi
org.eclipse.persistence.sdo EclipseLink SDO OSGI bundle
org.eclipse.persistence.equinox EclipseLink JPA Equinox OSGi Fragment
org.eclipse.persistence.jpa.modelgen.processor EclipseLink JPA Modelgen Processor (non-OSGi) (Meta-data only)
org.eclipse.persistence.tools.oracleddl Oracle DB model - OSGi bundle
org.eclipse.persistence.weaving EclipseLink JPA - "Weaving for Equinox" OSGi Fragment

Versions

For the available EclipseLink release versions please refer to the releases page. It is the 3 digit number that is used. For access to nightly or milestone builds please see EclipseLink/Maven/NightlyMilestones

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>

Issues With Nexus

The current repository have some issues when used with Nexus. Here are some workarounds.