| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| 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 |
| |
| --> |
| |
| <project name="gf-community" default="default" basedir="."> |
| <property file="build.properties"/> |
| |
| <path id="path2testng"> |
| <pathelement location="lib/testng-5.0-jdk15.jar"/> |
| </path> |
| |
| |
| <path id="class.path"> |
| <fileset dir="${install.dir}/lib"> |
| <include name="**/*.jar"/> |
| </fileset> |
| <pathelement location="classes"/> |
| </path> |
| <path id="test.classpath"> |
| <fileset dir="${install.dir}/lib"> |
| <include name="**/*.jar"/> |
| </fileset> |
| <fileset dir="./lib"> |
| <include name="**/*.jar"/> |
| </fileset> |
| <pathelement location="${test.class.output}"/> |
| </path> |
| |
| <taskdef name="testng" |
| classpathref="path2testng" |
| classname="org.testng.TestNGAntTask"/> |
| |
| <description>Builds, tests, and runs the project Hello JSP Application</description> |
| <!-- <import file="nbproject/build-impl.xml"/>--> |
| |
| <target name="echo"> |
| <echo message="Hello Community"/> |
| </target> |
| |
| <target name="build"> |
| <ant dir="web/helloworld" target="build"/> |
| <ant dir="ejb30/hello" target="build"/> |
| <ant dir="adminweb/basic" target="build"/> |
| </target> |
| |
| |
| <target name="compile-tests"> |
| <ant dir="web/helloworld" target="compile-tests" inheritAll="false"/> |
| <ant dir="ejb30/session/hello" target="compile-tests" inheritAll="false"/> |
| </target> |
| |
| <!--<target name="run"> |
| <ant dir="web/helloworld" target="run"/> |
| </target>--> |
| |
| <target name="deploy" > |
| <ant dir="web/helloworld" target="deploy" inheritAll="false"/> |
| <ant dir="ejb30/hello" target="deploy" inheritAll="false"/> |
| <!-- <ant dir="adminweb/basic" target="deploy"/>--> |
| </target> |
| |
| <target name="setup"> |
| <antcall target="build"/> |
| <antcall target="deploy"/> |
| </target> |
| |
| <!--<target name="run"> |
| <ant dir="web/helloworld" target="run"/> |
| <ant dir="ejb30/hello" target="run"/> |
| <ant dir="adminweb/basic" target="run"/> |
| </target>--> |
| |
| |
| <!--<target name="dist"> |
| <echo message="Save EAR/WAR/JAR file"/> |
| <ant dir="web/helloworld" target="dist"/> |
| </target>--> |
| |
| <target name="run"> |
| <echo message="=============Starting TestNG functional tests ============"/> |
| <mkdir dir="${test.report}"/> |
| <testng outputdir="${test.report}" |
| classpathref="test.classpath"> |
| <jvmarg value="-Djava.compiler=NONE"/> |
| <sysproperty key="basedir" value="${basedir}"/> |
| <!--<classfileset dir="classes/test" includes="**/SeleniumTest.class"/>--> |
| <xmlfileset dir="." includes="testng.xml"/> |
| </testng> |
| |
| <!--<antcall target="-post-test-run"/> --> |
| |
| </target> |
| |
| <!-- Generate the TestNG report --> |
| <target name="report"> |
| <junitreport todir="${test.report}"> |
| <fileset dir="."> |
| <include name="**/test-output/**/*.xml"/> |
| <exclude name="**/testng-failed.xml"/> |
| </fileset> |
| <report format="noframes" todir="${test.report}"/> |
| </junitreport> |
| </target> |
| |
| <!-- |
| ======================================================================== |
| Generates source zip of the project |
| ======================================================================== |
| --> |
| <target name="archive"> |
| <property name="final.src.name" value="glassfish-testsuite_${date}.zip"/> |
| |
| <zip zipfile="${final.src.name}" basedir="."> |
| |
| <exclude name="${result.output}/**"/> |
| <exclude name="${test.class.output}/**"/> |
| <exclude name="**/*.log"/> |
| <exclude name="**/*.bak"/> |
| <exclude name="**/*.class"/> |
| <!--exclude name="${build.dir}/build.properties"/>--> |
| |
| </zip> |
| |
| </target> |
| |
| |
| </project> |