blob: 4428f0abdbdd4258a25d70b2c40d63b04436c871 [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 commonBuild2 SYSTEM "file:./../common-build.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="project-name-here" default="all" basedir=".">
&commonSetup;
&commonBuild;
&testproperties;
&commonBuild2;
<target name="all" depends="build,deploy,run,report,undeploy"/>
<!-- Classpath definitions needed during compile/run time-->
<path id="compile.classpath">
<path refid="path2testng"/>
</path>
<path id="run.classpath">
<path refid="compile.classpath"/>
<pathelement location="${build.dir}"/>
</path>
<!-- TestNG xml fileset -->
<fileset id="run.xmlfileset"
dir="."
includes="testng.xml">
</fileset>
<!-- TestNG class fileset -->
<fileset id="run.classfileset"
dir="${build.dir}/"
includes="**/*.class">
</fileset>
<!-- if compile of servlet/ejb/other dependency classes is needed -->
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="source-dir-here"/>
</antcall>
</target>
<!-- compile TestNG based test classes -->
<target name="compile-tests" depends="clean">
<antcall target="common-compile-testng-tests">
<param name="compile.testng.srcdir" value="tests"/>
<param name="compile.testng.destdir" value="${build.dir}"/>
<param name="compile.testng.classpath" value="compile.classpath"/>
</antcall>
</target>
<!-- packaging for war/ear/rar and other related tasks -->
<target name="build" depends="compile">
<!-- antcalls to create war/ear, others here -->
</target>
<target name="deploy" depends="init-common">
<!-- antcall to deployment targets - see devtests/config/common.xml -->
</target>
<!-- Run TestNG test via testng.xml -->
<target name="run" depends="compile-tests">
<antcall target="common-run">
<param name="run.testng.classpath" value="run.classpath"/>
<param name="run.testng.xmlfileset" value="run.xmlfileset"/>
</antcall>
</target>
<!-- Run TestNG tests belonging to specified group names -->
<target name="run-groups" depends="build,deploy,compile-tests,report,undeploy">
<antcall target="common-run-groups">
<param name="run.testng.classpath" value="run.classpath"/>
<param name="run.testng.classfileset" value="run.classfileset"/>
</antcall>
</target>
<!-- This target runs failed tests from previous runs
Actual build.xml shouldn't need to modify this
See common-build.xml for the definition of common-run-failed -->
<target name="run-failed" depends="common-run-failed"/>
<!-- Geneate report -->
<target name="report" depends="common-report"/>
<target name="undeploy" depends="init-common">
<!-- antcalls to common undeployment targets -->
</target>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
<delete dir="${build.dir}"/>
<delete dir="gen"/>
<delete dir="test-output"/>
<delete dir="test-report"/>
</target>
</project>