openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r619723 - in /openjpa/trunk/openjpa-persistence-jdbc: pom.xml src/main/ant/ src/main/ant/enhancer.xml
Date Fri, 08 Feb 2008 01:15:46 GMT
Author: mikedd
Date: Thu Feb  7 17:15:44 2008
New Revision: 619723

URL: http://svn.apache.org/viewvc?rev=619723&view=rev
Log:
OPENJPA-512

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/
    openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml   (with props)
Modified:
    openjpa/trunk/openjpa-persistence-jdbc/pom.xml

Modified: openjpa/trunk/openjpa-persistence-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?rev=619723&r1=619722&r2=619723&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/pom.xml (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/pom.xml Thu Feb  7 17:15:44 2008
@@ -278,41 +278,23 @@
                         <phase>test-compile</phase>
                         <configuration>
                             <tasks>
-                                <path id="cp">
-                                    <path refid="maven.test.classpath"/>
-                                    <path refid="maven.compile.classpath"/>
-                                    <path refid="maven.dependency.classpath"/>
-                                </path>
-                                <taskdef name="openjpac" classname=
-                                    "org.apache.openjpa.ant.PCEnhancerTask">
-                                    <classpath refid="cp"/>
-                                </taskdef>
-                                <fileset id="enhance.path.ref"
-                                    dir="${project.build.testOutputDirectory}">
-                                    <include name="**/*.class"/>
-                                    <exclude name="**/Test*.class"/>
-                                    <exclude name="**/inheritance/serializable/*.class"/>
-                                    <exclude name="**/xml/*.class"/>
-                                    <exclude name="**/Unenhanced*.class"/>
-                                    <exclude name="**/AbstractUnenhanced*.class"/>
-                                </fileset>
-                                <openjpac>
-                                    <classpath refid="cp"/>
-                                    <fileset refid="enhance.path.ref"/>
-                                    <config log="DefaultLevel=${openjpa.loglevel}"/>
-                                </openjpac>
-                                <!--  Set detach state for serialization tests -->
-                                <openjpac>
-                                    <config detachState="fgs(DetachedStateField=true)"/>
-                                    <classpath refid="cp"/>
-                                    <fileset dir="${project.build.testOutputDirectory}">

-                                        <include name="**/inheritance/serializable/*.class"/>
-                                        <!--  include files from orm.xml -->
-                                        <include name="**/xml/*.class"/>
-                                        <exclude name="**/Test*.class"/>
-                                    </fileset>
-                                    <config log="DefaultLevel=${openjpa.loglevel}"/>
-                                </openjpac>
+                                <ant antfile="src/main/ant/enhancer.xml"
+                                    target="enhance.all.entities"
+                                    inheritRefs="true">
+                                    <!--
+                                      InheritAll doesn't seem to work. Pass in
+                                      properties manually.
+                                     -->
+                                    <property name="maven.test.skip" 
+                                        value="${maven.test.skip}"/>
+                                    <property name="outdir"
+                                        value="${project.build.outputDirectory}" />
+                                    <property
+                                        name="project.build.testOutputDirectory"
+                                        value="${project.build.testOutputDirectory}" />
+                                    <property name="openjpa.loglevel"
+                                        value="${openjpa.loglevel}" />
+                                </ant>
                             </tasks>
                         </configuration>
                         <goals>

Added: openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml?rev=619723&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml Thu Feb  7 17:15:44 2008
@@ -0,0 +1,85 @@
+<?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.   
+-->
+<project name="enhance" basedir=".">
+    <!--
+        This build file executes the PCEnhancer on the test entities. It's in a
+        separate file instead of nested in pom.xml to make some conditional 
+        processing easier.
+        
+        Test classes will not be compiled if maven is invoked with 
+        -Dmaven.tests.skip=true. 
+    -->
+
+    <condition property="maven.test.skip.istrue">
+        <istrue value="${maven.test.skip}" />
+    </condition>
+
+    <!-- ================================= 
+          target: enhance.all.entities              
+         ================================= -->
+    <target name="enhance.all.entities"
+            depends=""
+            description="--> enhance the test entities"
+            unless="maven.test.skip.istrue">
+        
+        <!-- 
+            Inherited references won't be present until the task is called. 
+            Therefore the path definition needs to stay inside the task.
+          --> 
+        <path id="cp">
+            <path refid="maven.test.classpath" />
+            <path refid="maven.compile.classpath" />
+            <path refid="maven.dependency.classpath" />
+        </path>
+
+        <taskdef name="openjpac"
+                 classname="org.apache.openjpa.ant.PCEnhancerTask">
+            <classpath refid="cp" />
+        </taskdef>
+
+        <fileset id="enhance.path.ref"
+                 dir="${project.build.testOutputDirectory}">
+            <include name="**/*.class" />
+            <exclude name="**/Test*.class" />
+            <exclude name="**/inheritance/serializable/*.class" />
+            <exclude name="**/xml/*.class" />
+            <exclude name="**/Unenhanced*.class" />
+            <exclude name="**/AbstractUnenhanced*.class" />
+        </fileset>
+        <openjpac>
+            <classpath refid="cp" />
+            <fileset refid="enhance.path.ref" />
+            <config log="DefaultLevel=${openjpa.loglevel}" />
+        </openjpac>
+        <!--  Set detach state for serialization tests -->
+        <openjpac>
+            <config detachState="fgs(DetachedStateField=true)" />
+            <classpath refid="cp" />
+            <fileset dir="${project.build.testOutputDirectory}">
+                <include name="**/inheritance/serializable/*.class" />
+                <!--  include files from orm.xml -->
+                <include name="**/xml/*.class" />
+                <exclude name="**/Test*.class" />
+            </fileset>
+            <config log="DefaultLevel=${openjpa.loglevel}" />
+        </openjpac>
+
+    </target>
+</project>
\ No newline at end of file

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message