You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/08/18 04:40:40 UTC

svn commit: r986552 - in /openjpa/branches/2.0.x: ./ openjpa-integration/daytrader/ openjpa-integration/validation/ openjpa-jdbc/ openjpa-lib/ openjpa-persistence-jdbc/ openjpa-persistence-locking/ openjpa-persistence/ openjpa-slice/ openjpa-testsuppor...

Author: dwoods
Date: Wed Aug 18 02:40:39 2010
New Revision: 986552

URL: http://svn.apache.org/viewvc?rev=986552&view=rev
Log:
OPENJPA-1712 Split creation of o-p-j-test-base.jar into its own build, as jar:test-jar doesn't allow creation of 2 tests.jar in the same module and maven can't get the dependency scope right if jar:jar is used to create the artifact.

Added:
    openjpa/branches/2.0.x/openjpa-testsupport/
    openjpa/branches/2.0.x/openjpa-testsupport/pom.xml   (with props)
Modified:
    openjpa/branches/2.0.x/openjpa-integration/daytrader/pom.xml
    openjpa/branches/2.0.x/openjpa-integration/validation/pom.xml
    openjpa/branches/2.0.x/openjpa-jdbc/pom.xml
    openjpa/branches/2.0.x/openjpa-lib/pom.xml
    openjpa/branches/2.0.x/openjpa-persistence-jdbc/pom.xml
    openjpa/branches/2.0.x/openjpa-persistence-locking/pom.xml
    openjpa/branches/2.0.x/openjpa-persistence/pom.xml
    openjpa/branches/2.0.x/openjpa-slice/pom.xml
    openjpa/branches/2.0.x/openjpa-xmlstore/pom.xml
    openjpa/branches/2.0.x/pom.xml

Modified: openjpa/branches/2.0.x/openjpa-integration/daytrader/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-integration/daytrader/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-integration/daytrader/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-integration/daytrader/pom.xml Wed Aug 18 02:40:39 2010
@@ -94,20 +94,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-tests</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
             <!-- old way of using antrun to enhance classes
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

Modified: openjpa/branches/2.0.x/openjpa-integration/validation/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-integration/validation/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-integration/validation/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-integration/validation/pom.xml Wed Aug 18 02:40:39 2010
@@ -160,9 +160,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa-persistence-jdbc</artifactId>
+            <artifactId>openjpa-testsupport</artifactId>
             <version>${project.version}</version>
-            <!-- <classifier>tests</classifier> -->
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
@@ -187,18 +186,6 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>

Modified: openjpa/branches/2.0.x/openjpa-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-jdbc/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-jdbc/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-jdbc/pom.xml Wed Aug 18 02:40:39 2010
@@ -81,37 +81,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
 </project>

Modified: openjpa/branches/2.0.x/openjpa-lib/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-lib/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-lib/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-lib/pom.xml Wed Aug 18 02:40:39 2010
@@ -120,34 +120,6 @@ openjpa.version=${project.version}</echo
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>

Modified: openjpa/branches/2.0.x/openjpa-persistence-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/pom.xml Wed Aug 18 02:40:39 2010
@@ -750,58 +750,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <!-- 
-                 Create a o-p-j-tests.jar so we can reuse some of the base
-                 TestCase classes in other modules, like openjpa-integration.
-            -->
-            <plugin> 
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>test-base-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <classifier>test-base</classifier>
-                            <classesDirectory>${project.build.testOutputDirectory}</classesDirectory>
-                            <includes>
-                                <!-- Note: Including entities in this jar will
-                                     cause problems for any modules that need
-                                     to enhance their own entities.
-                                -->
-                                <include>**/org/apache/openjpa/persistence/test/*.class</include>
-                                <include>META-INF/LICENSE*</include>
-                                <include>META-INF/NOTICE*</include>
-                                <include>META-INF/DISCLAIM*</include>
-                            </includes>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>

Modified: openjpa/branches/2.0.x/openjpa-persistence-locking/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-locking/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-locking/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-persistence-locking/pom.xml Wed Aug 18 02:40:39 2010
@@ -692,12 +692,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa-persistence-jdbc</artifactId>
+            <artifactId>openjpa-testsupport</artifactId>
             <version>${project.version}</version>
-            <!-- <classifier>test-base</classifier> -->
             <type>test-jar</type>
             <scope>test</scope>
-            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>commons-dbcp</groupId>
@@ -743,18 +741,6 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <argLine>${surefire.jvm.args}</argLine>

Modified: openjpa/branches/2.0.x/openjpa-persistence/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-persistence/pom.xml Wed Aug 18 02:40:39 2010
@@ -59,37 +59,4 @@
             <scope>provided</scope>
         </dependency>
     </dependencies>
-    
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
 </project>

Modified: openjpa/branches/2.0.x/openjpa-slice/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-slice/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-slice/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-slice/pom.xml Wed Aug 18 02:40:39 2010
@@ -128,34 +128,6 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <argLine>${test.jvm.arguments}</argLine>

Added: openjpa/branches/2.0.x/openjpa-testsupport/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-testsupport/pom.xml?rev=986552&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-testsupport/pom.xml (added)
+++ openjpa/branches/2.0.x/openjpa-testsupport/pom.xml Wed Aug 18 02:40:39 2010
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.   
+-->
+<!-- 
+    Please keep the project tag on one line to avoid confusing 
+    the release plugin.
+-->
+<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-parent</artifactId>
+        <version>2.0.1-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.openjpa</groupId>
+    <artifactId>openjpa-testsupport</artifactId>
+    <packaging>jar</packaging>
+    <name>OpenJPA Test Support Jar</name>
+
+    <dependencies>
+        <!-- make sure we build after o-p-j -->
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-persistence-jdbc</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <!-- need a depend on o-p-j tests jar -->
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-persistence-jdbc</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>jakarta-regexp</groupId>
+            <artifactId>jakarta-regexp</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--
+                    Manually build a subset jar of o-p-j-tests.jar
+                -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>extract-jar</id>
+                        <phase>test-compile</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <unjar overwrite="true" dest="${project.build.testOutputDirectory}">
+                                    <fileset dir="${basedir}/../openjpa-persistence-jdbc">
+                                        <include name="target/openjpa-persistence-jdbc-${project.version}-tests.jar" />
+                                    </fileset>
+                                </unjar>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                        <configuration>
+                            <includes>
+                                <!-- Note: Including entities in this jar will
+                                     cause problems for any modules that need
+                                     to enhance their own entities.
+                                -->
+                                <include>org/apache/openjpa/persistence/test/*.class</include>
+                                <include>META-INF/LICENSE*</include>
+                                <include>META-INF/NOTICE*</include>
+                                <include>META-INF/persistence.xml</include>
+                            </includes>
+                        </configuration>
+            </plugin>
+            <!-- Don't run any of the extracted tests here... -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: openjpa/branches/2.0.x/openjpa-testsupport/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/branches/2.0.x/openjpa-xmlstore/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-xmlstore/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-xmlstore/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-xmlstore/pom.xml Wed Aug 18 02:40:39 2010
@@ -46,7 +46,12 @@
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-persistence-jdbc</artifactId>
             <version>${project.version}</version>
-            <!-- <classifier>test-base</classifier> -->
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-testsupport</artifactId>
+            <version>${project.version}</version>
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
@@ -54,35 +59,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>default-jar</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <archive>
-                                <manifest>
-                                   <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                </manifest>
-                                <manifestEntries>
-                                    <Implementation-Build>${buildNumber}</Implementation-Build>
-                                </manifestEntries>
-                            </archive>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>attach-tests</id>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
             <!-- new way of using openjpa-maven-plugin to enhance classes -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>

Modified: openjpa/branches/2.0.x/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/pom.xml?rev=986552&r1=986551&r2=986552&view=diff
==============================================================================
--- openjpa/branches/2.0.x/pom.xml (original)
+++ openjpa/branches/2.0.x/pom.xml Wed Aug 18 02:40:39 2010
@@ -123,6 +123,7 @@
         <module>openjpa-jdbc</module>
         <module>openjpa-persistence</module>
         <module>openjpa-persistence-jdbc</module>
+        <module>openjpa-testsupport</module>
         <module>openjpa-persistence-locking</module>
         <module>openjpa-xmlstore</module>
         <module>openjpa-slice</module>