Jump to: navigation, search

Difference between revisions of "EclipseLink/Maven"

(15 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
__TOC__  
 
__TOC__  
 
</div> </div>
 
</div> </div>
The EclipseLink project currently produces a maven repository for its nightly, milestone, and release builds.
+
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]
 
+
<div align="center">'''https://oss.sonatype.org/content/groups/staging'''</div>
+
 
+
<div align="center"><a href="https://oss.sonatype.org/index.html#nexus-search;gav~org.eclipse.persistence">Browse Repo</a></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.  
 
 
== Configuring your pom.xml  ==
 
== 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 [[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.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 ===
 
=== Repositories ===
  
Within your pom.xml you will need to specify the EclipseLink repository (within <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 ====
 
==== oss.sonatype.org: 2.4.2 and Later ====
Line 34: Line 29:
 
==== Custom Repo: 2.4 and Earlier ====
 
==== Custom Repo: 2.4 and Earlier ====
  
For builds prior to EclipseLink 2.5 please use:
+
Builds prior to EclipseLink 2.4.2 are available at:
  
 
<source lang="xml">
 
<source lang="xml">
Line 45: Line 40:
 
== <dependencies> ==
 
== <dependencies> ==
  
The artifacts can then be added to you pom as follows. The complete list of available artifacts and their usage is below.
+
The artifacts can then be added to you pom as follows.  
  
 
<source lang="xml">
 
<source lang="xml">
Line 56: Line 51:
 
</source>
 
</source>
  
The following are the primary artifacts. All listed dependencies are also included in this repository.
+
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.
 +
 
  
 
{|{{BMTableStyle}}
 
{|{{BMTableStyle}}
Line 62: Line 58:
 
! Artifact Id  
 
! Artifact Id  
 
! Description
 
! Description
! Dependencies
 
! 2.4.0 POM
 
 
|-
 
|-
 
| eclipselink  
 
| eclipselink  
 
| The full eclipselink.jar (non-OSGi) including the full capabilities of all of the following artifact bundles and fragments.
 
| 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.jpa  
 
| 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.
 
| 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.moxy  
 
| 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.
 
| 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.nosql  
 
| org.eclipse.persistence.nosql  
 
| EclipseLink NoSQL (OSGi fragment): Provides NoSQL support extending org.eclipse.persistence.core.
 
| 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.oracle  
 
| org.eclipse.persistence.oracle  
 
| EclipseLink JPA for Oracle (OSGi fragment): Extended Oracle database capabilities extending the core bundle with specific Oracle JDBC dependencies.
 
| 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]
 
 
|-
 
|-
 
| org.eclipse.persistence.oracle.nosql  
 
| org.eclipse.persistence.oracle.nosql  
 
| EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle.
 
| EclipseLink NoSQL for Oracle (OSGI fragment): Oracle specific NoSQL support extending core bundle.
| 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
 
| [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.dbws  
 
| org.eclipse.persistence.dbws  
 
| EclipseLink DBWS OSGI bundle
 
| EclipseLink DBWS OSGI bundle
 
|-
 
|-
| org.eclipse.persistence.jpa.modelgen  
+
| org.eclipse.persistence.jpa.modelgen
| EclipseLink Modelgen pre-processor (non-OSGI)
+
| EclipseLink Modelgen pre-processor (non-OSGI) (pre-2.5.0)  
 
|-
 
|-
 
| org.eclipse.persistence.osgi  
 
| org.eclipse.persistence.osgi  
| <br>
+
| (pre-2.5.0 only)
 
|-
 
|-
 
| org.eclipse.persistence.sdo  
 
| org.eclipse.persistence.sdo  
Line 108: Line 90:
 
|-
 
|-
 
| org.eclipse.persistence.equinox  
 
| org.eclipse.persistence.equinox  
| EclipseLink JPA Equinox OSGi Fragment
+
| EclipseLink JPA Equinox OSGi Fragment (pre-2.5.0 only)
 
|-
 
|-
 
| org.eclipse.persistence.jpa.modelgen.processor  
 
| org.eclipse.persistence.jpa.modelgen.processor  
| EclipseLink JPA Modelgen Processor (non-OSGi) (Meta-data only)
+
| 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.tools.oracleddl
+
| org.eclipse.persistence.oracleddlparser
 
| Oracle DB model - OSGi bundle
 
| Oracle DB model - OSGi bundle
 
|-
 
|-
 
| org.eclipse.persistence.weaving  
 
| org.eclipse.persistence.weaving  
| EclipseLink JPA - "Weaving for Equinox" OSGi Fragment
+
| EclipseLink JPA - "Weaving for Equinox" OSGi Fragment (pre-2.5.0 only)
 
|}
 
|}
  
 
== Versions  ==
 
== Versions  ==
  
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]]
+
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].
  
 
== Sample pom.xml  (Staging) ==
 
== Sample pom.xml  (Staging) ==
Line 159: Line 141:
 
</project>
 
</project>
 
</source>
 
</source>
 
== Issues With Nexus ==
 
 
The current repository have some issues when used with Nexus.  Here are some [http://wiki.eclipse.org/EclipseLink/Maven/Nexus  workarounds].
 
 
[[Category:EclipseLink|Maven]]
 

Revision as of 12:59, 28 May 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

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>