blob: 294d73525a7556705980513f0ff3b34294777ad4 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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="standalone-persistence" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&testproperties;
<target name="all" depends="build,setup,deploy,run,unsetup,undeploy"/>
<target name="run-test" depends="build,setup,deploy,run,unsetup,undeploy"/>
<target name="clean" depends="init-common">
<delete dir="${build.classes.dir}"/>
<delete dir="${assemble.dir}"/>
</target>
<target name="setup" depends="init-common">
<antcall target="create-jdbc-connpool-common"/>
<antcall target="create-jdbc-resource-common"/>
<antcall target="create-jdbc-connpool-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
</antcall>
<antcall target="create-jdbc-resource-common">
<param name="jdbc.resource.name" value="jdbc/sqetestDB"/>
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
</antcall>
<antcall target="sql"/>
</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
</target>
<target name="build-entity" depends="init-common">
<property name="ejbjar.classes" value="**/*Entity*.class"/>
<property name="ejbjar.files" value="${build.classes.dir}"/>
<property name="ejb.jar" value="${assemble.dir}/${appname}-persistence.par"/>
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
<mkdir dir="${assemble.dir}"/>
<delete file="${ejb.jar}" failonerror="false"/>
<echo message="sqe-common.xml: Generating ejb-jar inside build directory"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<!-- optional files -->
<copy file="${persistence.xml}"
tofile="${build.classes.dir}/META-INF/persistence.xml"
failonerror="false"/>
<!-- make a jar -->
<jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
includes ="${ejbjar.classes}">
<metainf dir="${build.classes.dir}/META-INF">
<include name="**/*.xml"/>
<include name="**/*.wsdl"/>
</metainf>
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
</target>
<target name="build" depends="init-common,clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
<!--<antcall target="build-entity"/>-->
<antcall target="build-ear-common"/>
</target>
<target name="run" depends="init-common">
<antcall target="runclient-common">
<param name="appclient.application.args" value="${testsuite.id} "/>
</antcall>
</target>
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
</target>
<target name="drop" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/drop_${db.type}.sql"/>
</antcall>
</target>
<target name="unsetup" depends="init-common">
<antcall target="drop"/>
<antcall target="undeploy-jdbc-common"/>
<antcall target="delete-jdbc-connpool-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
</antcall>
<antcall target="delete-jdbc-resource-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
<param name="jdbc.resource.name" value="jdbc/sqetestDB"/>
</antcall>
</target>
</project>