mirror of https://github.com/apache/openjpa.git
OPENJPA-2088 remove cyclic build dependencies
By using just the parts of the openjpa dependencies we really need, we can get rid of cyclic build dependencies. I also added a help page which describes how to manually configure the openjpa-maven-plugin dependencies for using it with an older OpenJPA version. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1211489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fdf242b40
commit
78d12c9b0a
|
@ -100,6 +100,13 @@
|
|||
<artifactId>openjpa-persistence</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- needed for db specific hooks -->
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence-jdbc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||
|
|
|
@ -23,6 +23,13 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-tools</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.openjpa.tools.openjpa-maven-plugin.testing</groupId>
|
||||
<artifactId>enhance</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
@ -33,9 +40,29 @@
|
|||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-validation_1.0_spec</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<artifactId>openjpa-kernel</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-jdbc</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
|
||||
|
@ -47,6 +74,13 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-maven-plugin</artifactId>
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-tools</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.openjpa.tools.openjpa-maven-plugin.testing</groupId>
|
||||
<artifactId>dependingProjects</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
@ -35,12 +41,34 @@
|
|||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-validation_1.0_spec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<modules>
|
||||
<module>prjA</module>
|
||||
<module>prjB</module>
|
||||
|
|
|
@ -42,7 +42,17 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<artifactId>openjpa-kernel</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-jdbc</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -23,10 +23,26 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-tools</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.openjpa.tools.openjpa-maven-plugin.testing</groupId>
|
||||
<artifactId>nonDefaultPersistenceXml</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-validation_1.0_spec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
@ -35,7 +51,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<artifactId>openjpa-kernel</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
|
||||
|
@ -47,6 +63,14 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-maven-plugin</artifactId>
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
-->
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-tools</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.openjpa.tools.openjpa-maven-plugin.testing</groupId>
|
||||
<artifactId>testDependencies</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
@ -27,12 +34,34 @@
|
|||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jpa_2.0_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-validation_1.0_spec</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<modules>
|
||||
<module>prjA</module>
|
||||
<module>prjB</module>
|
||||
|
|
|
@ -34,7 +34,17 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<artifactId>openjpa-kernel</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-jdbc</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence</artifactId>
|
||||
<version>@pom.version@</version>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
------
|
||||
Enhance
|
||||
------
|
||||
Mark Struberg
|
||||
<struberg@yahoo.de>
|
||||
------
|
||||
Dezember, 7th, 2011
|
||||
------
|
||||
|
||||
Running openjpa-maven-plugin with different OpenJPA verions
|
||||
|
||||
The openjpa-maven-plugin by default uses OpenJPA with exactly the same version
|
||||
as the plugin itself. If you like to use an older OpenJPA version (which doesn't
|
||||
have an org.apache.openjpa:openjpa-maven-plugin), you can just override the
|
||||
plugin dependencies
|
||||
|
||||
-------------------
|
||||
<project>
|
||||
[...]
|
||||
<build>
|
||||
[...]
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-maven-plugin</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enhancer</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>enhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Use your own openjpa dependencies -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-kernel</artifactId>
|
||||
<version>${oldopenjpa.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-jdbc</artifactId>
|
||||
<version>${oldopenjpa.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence</artifactId>
|
||||
<version>${oldopenjpa.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- needed for db specific hooks -->
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa-persistence-jdbc</artifactId>
|
||||
<version>${oldopenjpa.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</executions>
|
||||
</plugin>
|
||||
[...]
|
||||
</plugins>
|
||||
[...]
|
||||
</build>
|
||||
[...]
|
||||
</project>
|
||||
-------------------
|
|
@ -70,20 +70,12 @@ OpenJPA Maven Plugin
|
|||
</execution>
|
||||
</executions>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.openjpa</groupId>
|
||||
<artifactId>openjpa</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</plugin>
|
||||
+-----------+
|
||||
|
||||
* You have to explicitly specify an OpenJPA dependency in the dependencies section
|
||||
of the plugin! This has been changed to make sure that the correct OpenJPA version is
|
||||
used for compile time enhancement and other tasks.
|
||||
* You don't have to explicitly specify an OpenJPA dependency in the dependencies section
|
||||
of the plugin! Follow the following guide to use this plugin with {{{examples/older_versions.html}older OpenJPA versions}}.
|
||||
|
||||
|
||||
* The <<<openjpa:enhance>>> mojo will automatically be called in the
|
||||
<<<process-classes>>> phase.
|
||||
|
|
Loading…
Reference in New Issue