mirror of https://github.com/apache/openjpa.git
OPENJPA-512
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@619723 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
81cb7e17f9
commit
99bf6d14f8
|
@ -278,41 +278,23 @@
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<tasks>
|
<tasks>
|
||||||
<path id="cp">
|
<ant antfile="src/main/ant/enhancer.xml"
|
||||||
<path refid="maven.test.classpath"/>
|
target="enhance.all.entities"
|
||||||
<path refid="maven.compile.classpath"/>
|
inheritRefs="true">
|
||||||
<path refid="maven.dependency.classpath"/>
|
<!--
|
||||||
</path>
|
InheritAll doesn't seem to work. Pass in
|
||||||
<taskdef name="openjpac" classname=
|
properties manually.
|
||||||
"org.apache.openjpa.ant.PCEnhancerTask">
|
-->
|
||||||
<classpath refid="cp"/>
|
<property name="maven.test.skip"
|
||||||
</taskdef>
|
value="${maven.test.skip}"/>
|
||||||
<fileset id="enhance.path.ref"
|
<property name="outdir"
|
||||||
dir="${project.build.testOutputDirectory}">
|
value="${project.build.outputDirectory}" />
|
||||||
<include name="**/*.class"/>
|
<property
|
||||||
<exclude name="**/Test*.class"/>
|
name="project.build.testOutputDirectory"
|
||||||
<exclude name="**/inheritance/serializable/*.class"/>
|
value="${project.build.testOutputDirectory}" />
|
||||||
<exclude name="**/xml/*.class"/>
|
<property name="openjpa.loglevel"
|
||||||
<exclude name="**/Unenhanced*.class"/>
|
value="${openjpa.loglevel}" />
|
||||||
<exclude name="**/AbstractUnenhanced*.class"/>
|
</ant>
|
||||||
</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>
|
|
||||||
</tasks>
|
</tasks>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue