Path: blob/master/test/functional/cmdline_options_testresources/build.xml
6000 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="cmdline_options_testresources tests" default="build" basedir=".">25<taskdef resource='net/sf/antcontrib/antlib.xml'/>26<description>27Build cmdline_options_testresources28</description>2930<!-- set global properties for this build -->31<property name="DEST" value="${BUILD_ROOT}/functional/cmdline_options_testresources" />32<property name="jarfile" value="${DEST}/cmdlinetestresources.jar" />3334<!--Properties for this particular build-->35<property name="src" location="./src"/>36<property name="src_80" location="./src_80"/>37<property name="src_90" location="./src_90"/>38<property name="build" location="./bin"/>39<property name="TestUtilities" location="../TestUtilities/src"/>4041<target name="init">42<mkdir dir="${DEST}" />43<mkdir dir="${build}"/>44</target>4546<target name="compile" depends="init" description="compile the source " >47<echo>Ant version is ${ant.version}</echo>48<echo>============COMPILER SETTINGS============</echo>49<echo>===fork: yes</echo>50<echo>===executable: ${compiler.javac}</echo>51<echo>===debug: on</echo>52<echo>===destdir: ${DEST}</echo>535455<if>56<equals arg1="${JDK_VERSION}" arg2="8"/>57<then>58<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">59<src path="${src}" />60<src path="${src_80}" />61</javac>62</then>63<else>64<if>65<equals arg1="${JCL_VERSION}" arg2="latest"/>66<then>67<property name="addExports" value="--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED" />68</then>69<else>70<property name="addExports" value='--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED' />71</else>72</if>73<javac srcdir="${src}" destdir="${build}" source="1.9" target="1.9" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">74<src path="${src}" />75<src path="${src_90}" />76<src path="${TestUtilities}" />77<compilerarg line='${addExports}' />78<classpath>79<pathelement location="${LIB_DIR}/testng.jar"/>80</classpath>81</javac>82</else>83</if>84</target>8586<target name="dist" depends="compile" description="generate the distribution" >87<!-- Store all class files in cmdlinetestresources.jar file -->88<jar jarfile="${jarfile}" filesonly="true">89<fileset dir="${build}"/>90<fileset dir="${src}"/>91</jar>92<copy todir="${DEST}">93<fileset dir="${src}/../" includes="*.xml" />94</copy>95</target>9697<target name="check-jar">98<available file="${jarfile}" property="jar.exist"/>99</target>100101<target name="clean" depends="dist" description="clean up" >102<!-- Delete the ${build} directory trees -->103<delete dir="${build}"/>104</target>105106<target name="build" depends="check-jar" unless="jar.exist">107<if>108<or>109<equals arg1="${JDK_IMPL}" arg2="ibm" />110<equals arg1="${JDK_IMPL}" arg2="openj9" />111</or>112<then>113<antcall target="clean" inheritall="true" />114</then>115</if>116</target>117</project>118119120