blob: 76f795a999b9efc9ef302cce5c4c6f0620276392 [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE project [
<!--
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="ooc" default="all" basedir=".">
&commonSetup;
&commonBuild;
&testproperties;
<target name="all" depends="clean,run,report"/>
<path id="compile.cp">
<pathelement location="${env.S1AS_HOME}/lib/toplink-essentials.jar"/>
<pathelement location="${env.APS_HOME}/lib/testng.jar"/>
</path>
<!-- Custom compilation for out-of-cointainer test -->
<target name="compile-client-ooc" depends="init-common">
<mkdir dir="${build.classes.dir}"/>
<javac destdir="${build.classes.dir}" debug="on">
<src path="../framework"/>
<src path="client-ooc"/>
<classpath>
<path refid="compile.cp" />
</classpath>
</javac>
</target>
<!-- Standard compilation for JPA POJOs -->
<target name="compile-ejb" depends="init-common">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${persistence.xml}" tofile="${build.classes.dir}/META-INF/persistence.xml"/>
</target>
<target name="compile" depends="compile-ejb, compile-client-ooc">
</target>
<!-- not currently used -->
<target name="package-persistence" depends="compile">
<mkdir dir="${assemble.dir}"/>
<jar destfile="${assemble.dir}/${appname}-persistence.jar" update="true">
<metainf file="${persistence.xml}"/>
<fileset dir="${build.classes.dir}"
includes="oracle/toplink/essentials/testing/models/cmp3/advanced/*.class"
/>
</jar>
</target>
<target name="build" depends="compile">
</target>
<path id="run.cp">
<!-- ${build.classes.dir} not defined during run target???
<pathelement location="${build.classes.dir}"/>
-->
<pathelement location="${env.APS_HOME}/build/module/classes"/>
<pathelement location="${env.S1AS_HOME}/javadb/lib/derbyclient.jar"/>
<path refid="compile.cp"/>
</path>
<target name="run" depends="compile">
<java fork="yes"
classpathref="run.cp"
classname="org.testng.TestNG">
<jvmarg value="-ea"/>
<arg value="testng.xml"/>
<jvmarg value="-javaagent:${env.S1AS_HOME}/lib/toplink-essentials-agent.jar"/>
</java>
</target>
<!-- Generate the TestNG report -->
<target name="report">
<mkdir dir="test-report"/>
<junitreport todir="test-report">
<fileset dir="test-output">
<include name="*.xml"/>
</fileset>
<report format="noframes" todir="test-report"/>
</junitreport>
</target>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
<!-- clean-up Java2DB left-overs -->
<delete file="createDDL.jdbc"/>
<delete file="dropDDL.jdbc"/>
<!-- clean-up TestNG output -->
<delete dir="test-output"/>
<delete dir="test-report"/>
</target>
</project>