openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1211489 - in /openjpa/trunk/openjpa-tools/openjpa-maven-plugin: ./ src/it/default_settings/ src/it/dependingArtifact/ src/it/dependingArtifact/prjB/ src/it/nonDefaultPersistenceXml/ src/it/testDependencies/ src/it/testDependencies/prjB/ sr...
Date Wed, 07 Dec 2011 16:05:25 GMT
Author: struberg
Date: Wed Dec  7 16:05:24 2011
New Revision: 1211489

URL: http://svn.apache.org/viewvc?rev=1211489&view=rev
Log:
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.

Added:
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/older_versions.apt
      - copied, changed from r1211383, openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/enhance.apt
Modified:
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/prjB/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/prjB/pom.xml
    openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/usage.apt

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/pom.xml Wed Dec  7 16:05:24 2011
@@ -101,6 +101,13 @@
             <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>
         </dependency>

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/default_settings/pom.xml Wed Dec
 7 16:05:24 2011
@@ -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>
@@ -34,8 +41,28 @@
         </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-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</artifactId>
+            <artifactId>openjpa-persistence</artifactId>
             <version>@pom.version@</version>
         </dependency>
 
@@ -48,6 +75,13 @@
     <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>
                 <version>@pom.version@</version>

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/pom.xml Wed
Dec  7 16:05:24 2011
@@ -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>
@@ -36,11 +42,33 @@
 
     <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>

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/prjB/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/prjB/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/prjB/pom.xml
(original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/dependingArtifact/prjB/pom.xml
Wed Dec  7 16:05:24 2011
@@ -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>
 

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
(original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/nonDefaultPersistenceXml/pom.xml
Wed Dec  7 16:05:24 2011
@@ -23,11 +23,27 @@
 <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>
             <version>3.8.2</version>
@@ -35,7 +51,7 @@
 
         <dependency>
             <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa</artifactId>
+            <artifactId>openjpa-kernel</artifactId>
             <version>@pom.version@</version>
         </dependency>
 
@@ -48,6 +64,14 @@
     <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>
                 <version>@pom.version@</version>

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/pom.xml Wed Dec
 7 16:05:24 2011
@@ -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>
@@ -28,11 +35,33 @@
 
     <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>

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/prjB/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/prjB/pom.xml?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/prjB/pom.xml
(original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/it/testDependencies/prjB/pom.xml
Wed Dec  7 16:05:24 2011
@@ -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>
 

Copied: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/older_versions.apt
(from r1211383, openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/enhance.apt)
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/older_versions.apt?p2=openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/older_versions.apt&p1=openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/enhance.apt&r1=1211383&r2=1211489&rev=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/enhance.apt (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/older_versions.apt
Wed Dec  7 16:05:24 2011
@@ -4,22 +4,16 @@
  Mark Struberg
  <struberg@yahoo.de>
  ------
- November 29, 2010
+ Dezember, 7th, 2011
  ------
 
-Enhance
+Running openjpa-maven-plugin with different OpenJPA verions
 
-  The following build configuration shows how to enhance JPA entities
-  at compile time. Please consult the OpenJPA documentation for more
-  details on compiletime enhancement versus runtime enhancement.
-  
-  The {{{../enhance-mojo.html}openjpa:enhance}} mojo will typically be 
-  called in the <<<process-classes>>> phase.
+  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
 
-  Please note that the tmpClassLoader defaults to <<<false>>> to make
-  sure that classes in depending artifacts (like enums in interfaces)
-  can be parsed by the PCEnhancer.  
-  
 -------------------
 <project>
   [...]
@@ -29,7 +23,7 @@ Enhance
       <plugin>
         <groupId>org.apache.openjpa</groupId>
         <artifactId>openjpa-maven-plugin</artifactId>
-        <version>1.2</version>
+        <version>2.2.0</version>
         <executions>
           <execution>
             <id>enhancer</id>
@@ -38,7 +32,32 @@ Enhance
               <goal>enhance</goal>
             </goals>
           </execution>
-        </executions> 
+
+          <!-- 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>
@@ -47,4 +66,3 @@ Enhance
   [...]
 </project>
 -------------------
- 
\ No newline at end of file

Modified: openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/usage.apt?rev=1211489&r1=1211488&r2=1211489&view=diff
==============================================================================
--- openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/usage.apt (original)
+++ openjpa/trunk/openjpa-tools/openjpa-maven-plugin/src/site/apt/usage.apt Wed Dec  7 16:05:24
2011
@@ -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.



Mime
View raw message