Path: blob/master/test/functional/cmdLineTests/shareClassTests/URLHelperTests/build.xml
6004 views
<?xml version="1.0"?>12<!--3Copyright (c) 2016, 2021 IBM Corp. and others45This program and the accompanying materials are made available under6the terms of the Eclipse Public License 2.0 which accompanies this7distribution and is available at https://www.eclipse.org/legal/epl-2.0/8or the Apache License, Version 2.0 which accompanies this distribution and9is available at https://www.apache.org/licenses/LICENSE-2.0.1011This Source Code may also be made available under the following12Secondary Licenses when the conditions for such availability set13forth in the Eclipse Public License, v. 2.0 are satisfied: GNU14General Public License, version 2 with the GNU Classpath15Exception [1] and GNU General Public License, version 2 with the16OpenJDK Assembly Exception [2].1718[1] https://www.gnu.org/software/classpath/license.html19[2] http://openjdk.java.net/legal/assembly-exception.html2021SPDX-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-exception22-->2324<project name="URLHelperTests" default="build" basedir=".">25<taskdef resource="net/sf/antcontrib/antlib.xml" />26<description>27Build URLHelperTests28</description>2930<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/>3132<!-- set properties for this build -->33<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/shareClassTests/URLHelperTests" />34<property name="jarfile" value="${DEST}/URLHelperTests.jar" />3536<property name="PROJECT_ROOT" location="." />37<property name="src" location="."/>38<property name="build" location="./bin"/>3940<property name="SharedClassesTestClasses_srddir" value="../testClasses/" />41<property name="SharedClassUtils_srddir" value="../utils/src/" />42<property name="BatchFiles_srddir" value="../batchfiles/" />434445<import file="../testClasses/build.xml" />46<import file="../../../cmdline_options_tester/build.xml" />4748<target name="init">49<mkdir dir="${DEST}" />50<mkdir dir="${build}" />51</target>5253<target name="AddBatchAndScriptFilesToPackage" >54<mkdir dir="${build}/batchfiles" />55<copy todir="${build}/batchfiles">56<fileset dir="${BatchFiles_srddir}"/>57</copy>58</target>5960<target name="compile" depends="init,AddTestClassesToPackage, AddBatchAndScriptFilesToPackage" description="compile the source">61<echo>Ant version is ${ant.version}</echo>62<echo>============COMPILER SETTINGS============</echo>63<echo>===fork: yes</echo>64<echo>===executable: ${compiler.javac}</echo>65<echo>===debug: on</echo>66<echo>===destdir: ${DEST}</echo>6768<!--691.) Copy config files ...70-->71<copy todir="${build}">72<fileset dir="${src}" includes="*.xml" excludes="playlist.xml" />73</copy>7475<!--762.) APITests directory ...77-->78<mkdir dir="${build}/APITests"/>79<copy todir="${build}/APITests">80<fileset dir="${src}/APITests/"/>81</copy>82<if>83<equals arg1="${JDK_VERSION}" arg2="8"/>84<then>85<javac srcdir="${build}/APITests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">86<src path="${SharedClassUtils_srddir}"/>87</javac>88</then>89<else>90<property name="addExports" value="--add-modules openj9.sharedclasses --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED" />91<javac srcdir="${build}/APITests" destdir="${build}" classpath="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">92<src path="${SharedClassUtils_srddir}"/>93<compilerarg line='${addExports}' />94</javac>95</else>96</if>9798<!--993.) ClassPathMatchingTests directory ...100-->101<mkdir dir="${build}/ClassPathMatchingTests"/>102<copy todir="${build}/ClassPathMatchingTests">103<fileset dir="${src}/ClassPathMatchingTests/"/>104</copy>105<if>106<equals arg1="${JDK_VERSION}" arg2="8"/>107<then>108<javac srcdir="${build}/ClassPathMatchingTests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">109<src path="${SharedClassUtils_srddir}"/>110</javac>111</then>112<else>113<property name="addExports" value="--add-modules openj9.sharedclasses --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED" />114<javac srcdir="${build}/ClassPathMatchingTests" destdir="${build}" classpath="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">115<src path="${SharedClassUtils_srddir}"/>116<compilerarg line='${addExports}' />117</javac>118</else>119</if>120121<!--1224.) PartitioningTests directory ...123-->124<mkdir dir="${build}/PartitioningTests"/>125<mkdir dir="${build}/PartitioningTests/props_unix"/>126<mkdir dir="${build}/PartitioningTests/props_win"/>127<copy todir="${build}/PartitioningTests/">128<fileset dir="${src}/PartitioningTests/"/>129</copy>130<copy todir="${build}/PartitioningTests/props_unix">131<fileset dir="${src}/PartitioningTests/props_unix"/>132</copy>133<copy todir="${build}/PartitioningTests/props_win">134<fileset dir="${src}/PartitioningTests/props_win"/>135</copy>136<javac srcdir="${build}/PartitioningTests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">137</javac>138139<!--1405.) StaleClassPathEntryTests directory ...141-->142<mkdir dir="${build}/StaleClassPathEntryTests"/>143<mkdir dir="${build}/StaleClassPathEntryTests/props_unix"/>144<mkdir dir="${build}/StaleClassPathEntryTests/props_win"/>145<copy todir="${build}/StaleClassPathEntryTests/">146<fileset dir="${src}/StaleClassPathEntryTests/"/>147</copy>148<copy todir="${build}/StaleClassPathEntryTests/props_unix">149<fileset dir="${src}/StaleClassPathEntryTests/props_unix"/>150</copy>151<copy todir="${build}/StaleClassPathEntryTests/props_win">152<fileset dir="${src}/StaleClassPathEntryTests/props_win"/>153</copy>154<javac srcdir="${build}/StaleClassPathEntryTests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">155</javac>156</target>157158<target name="dist" depends="compile" description="generate the distribution">159<jar jarfile="${jarfile}" filesonly="true">160<fileset dir="${build}" />161</jar>162<copy todir="${DEST}">163<fileset dir="${src}" />164<fileset dir="${src}" includes="*.mk" />165</copy>166</target>167168<target name="clean" depends="dist" description="clean up">169<!-- Delete the ${build} directory trees -->170<delete dir="${build}" />171</target>172173<target name="check-jar">174<available file="${jarfile}" property="jar.exist"/>175</target>176177<target name="build" depends="check-jar,buildCmdLineTestTools" unless="jar.exist">178<if>179<or>180<equals arg1="${JDK_IMPL}" arg2="ibm" />181<equals arg1="${JDK_IMPL}" arg2="openj9" />182</or>183<then>184<antcall target="clean" inheritall="true" />185</then>186</if>187</target>188</project>189190191