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>
|
||||
<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>
|
||||
|
|
|
@ -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