Path: blob/master/test/functional/cmdLineTests/shareClassTests/TokenHelperTests/build.xml
6004 views
<?xml version="1.0"?>1<!--2Copyright (c) 2005, 2021 IBM Corp. and others34This program and the accompanying materials are made available under5the terms of the Eclipse Public License 2.0 which accompanies this6distribution and is available at https://www.eclipse.org/legal/epl-2.0/7or the Apache License, Version 2.0 which accompanies this distribution and8is available at https://www.apache.org/licenses/LICENSE-2.0.910This Source Code may also be made available under the following11Secondary Licenses when the conditions for such availability set12forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13General Public License, version 2 with the GNU Classpath14Exception [1] and GNU General Public License, version 2 with the15OpenJDK Assembly Exception [2].1617[1] https://www.gnu.org/software/classpath/license.html18[2] http://openjdk.java.net/legal/assembly-exception.html1920SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception21-->22<project name="TokenHelperTests" default="build" basedir=".">23<taskdef resource='net/sf/antcontrib/antlib.xml'/>24<description>25Build TokenHelperTests26</description>2728<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/>2930<!-- set global properties for this build -->31<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/shareClassTests/TokenHelperTests" />32<property name="jarfile" value="${DEST}/TokenHelperTests.jar" />33<property name="src" location="."/>34<property name="build" location="./bin"/>3536<!--Properties for this particular build-->37<property name="SharedClassUtils_srddir" value="../utils/src/" />38<property name="BatchFiles_srddir" value="../batchfiles/" />3940<target name="init">41<mkdir dir="${DEST}" />42<mkdir dir="${build}" />43</target>4445<import file="../testClasses/build.xml" />46<import file="../../../cmdline_options_tester/build.xml" />4748<!--49NOTE: The below targets are overridden from cmdline_options_tester/build.xml50-->51<target name="-pre-package" depends="" description="copy multiple projects source">52</target>5354<target name="AddBatchAndScriptFilesToPackage" >55<mkdir dir="${build}/batchfiles" />56<copy todir="${build}/batchfiles">57<fileset dir="${BatchFiles_srddir}"/>58</copy>59</target>6061<target name="compile" depends="init,AddTestClassesToPackage,AddBatchAndScriptFilesToPackage" description="compile the source" >62<echo>Ant version is ${ant.version}</echo>63<!--641.) Copy config files ...65-->66<copy todir="${build}">67<fileset dir="${src}" includes="*.xml" excludes="playlist.xml" />68</copy>6970<!--712.) APITests directory ...72-->73<mkdir dir="${build}/APITests"/>74<copy todir="${build}/APITests">75<fileset dir="${src}/APITests/"/>76</copy>77<if>78<equals arg1="${JDK_VERSION}" arg2="8"/>79<then>80<javac srcdir="${build}/APITests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">81<src path="${SharedClassUtils_srddir}"/>82</javac>83</then>84<else>85<property name="addExports" value="--add-modules openj9.sharedclasses --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED" />86<javac srcdir="${build}/APITests" destdir="${build}" classpath="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">87<src path="${SharedClassUtils_srddir}"/>88<compilerarg line='${addExports}' />89</javac>90</else>91</if>9293<!--943.) StaleMarkingTests directory ...95-->96<mkdir dir="${build}/StaleMarkingTests"/>97<copy todir="${build}/StaleMarkingTests">98<fileset dir="${src}/StaleMarkingTests/"/>99</copy>100<javac srcdir="${build}/StaleMarkingTests" destdir="${build}" debug="on" fork="true" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1" />101102<!--1034.) TimeStampingTests directory ...104-->105<mkdir dir="${build}/TimeStampingTests"/>106<mkdir dir="${build}/TimeStampingTests/props_unix"/>107<mkdir dir="${build}/TimeStampingTests/props_win"/>108<copy todir="${build}/TimeStampingTests/">109<fileset dir="${src}/TimeStampingTests/"/>110</copy>111<copy todir="${build}/TimeStampingTests/props_unix">112<fileset dir="${src}/TimeStampingTests/props_unix"/>113</copy>114<copy todir="${build}/TimeStampingTests/props_win">115<fileset dir="${src}/TimeStampingTests/props_win"/>116</copy>117<javac srcdir="${build}/TimeStampingTests" destdir="${build}" debug="on" fork="true" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1" />118</target>119120<target name="dist" depends="compile" description="generate the distribution">121<jar jarfile="${jarfile}" filesonly="true">122<fileset dir="${build}"/>123</jar>124<copy todir="${DEST}">125<fileset dir="${src}" />126<fileset dir="${src}" includes="*.mk" />127</copy>128</target>129130<target name="clean" depends="dist" description="clean up">131<!-- Delete the ${build} directory trees -->132<delete dir="${build}" />133</target>134135<target name="check-jar">136<available file="${jarfile}" property="jar.exist"/>137</target>138139<target name="build" depends="check-jar,buildCmdLineTestTools" unless="jar.exist">140<if>141<or>142<equals arg1="${JDK_IMPL}" arg2="ibm" />143<equals arg1="${JDK_IMPL}" arg2="openj9" />144</or>145<then>146<antcall target="clean" inheritall="true" />147</then>148</if>149</target>150</project>151152153