Path: blob/master/test/functional/Jsr335/build.xml
6000 views
<?xml version="1.0"?>1<!--2Copyright (c) 2016, 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="J9 JSR335 Test" default="build" basedir=".">23<taskdef resource="net/sf/antcontrib/antlib.xml" />24<description>25Build J9 JSR335 Test26</description>2728<!-- set global properties for this build -->29<property name="DEST" value="${BUILD_ROOT}/functional/Jsr335" />3031<!--Properties for this particular build-->32<property name="src" location="src" />33<property name="build" location="bin" />34<property name="transformerListener" location="${TEST_ROOT}/Utils/src" />35<property name="LIB" value="junit4,asm_all,jcommander,testng" />36<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />3738<target name="init">39<mkdir dir="${DEST}" />40<mkdir dir="${build}" />41</target>4243<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source">44<echo>Ant version is ${ant.version}</echo>45<echo>============COMPILER SETTINGS============</echo>46<echo>===fork: yes</echo>47<echo>===executable: ${compiler.javac}</echo>48<echo>===debug: on</echo>49<echo>===destdir: ${DEST}</echo>5051<if>52<equals arg1="${JDK_VERSION}" arg2="8" />53<then>54<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src" />55<property name="addExports" value="" />56</then>57<else>58<if>59<matches string="${JDK_VERSION}" pattern="^1[1-6]$$" />60<then>61<!-- Java 11-16 -->62<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src_110" />63</then>64<else>65<!-- Java 17+ -->66<property name="src_access" location="${TEST_ROOT}/functional/UnsafeAccess/src_170" />67</else>68</if>69<property name="addExports" value="--add-exports java.base/jdk.internal.misc=ALL-UNNAMED" />70</else>71</if>7273<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">74<src path="${src}" />75<src path="${src_access}" />76<src path="${transformerListener}" />77<compilerarg line='${addExports}' />78<classpath>79<pathelement location="${LIB_DIR}/asm-all.jar" />80<pathelement location="${LIB_DIR}/testng.jar" />81<pathelement location="${LIB_DIR}/jcommander.jar" />82<pathelement location="${LIB_DIR}/junit4.jar" />83</classpath>84</javac>85</target>8687<target name="dist" depends="compile" description="generate the distribution">88<jar jarfile="${DEST}/Jsr335.jar" filesonly="true">89<fileset dir="${build}" />90<fileset dir="${src}/../" includes="*.properties,*.xml" />91</jar>92<copy todir="${DEST}">93<fileset dir="${src}/../" includes="*.xml" />94<fileset dir="${src}/../" includes="*.mk" />95</copy>96</target>9798<target name="clean" depends="dist" description="clean up">99<!-- Delete the ${build} directory trees -->100<delete dir="${build}" />101</target>102103<target name="build">104<if>105<or>106<equals arg1="${JDK_IMPL}" arg2="ibm" />107<equals arg1="${JDK_IMPL}" arg2="openj9" />108</or>109<then>110<antcall target="clean" inheritall="true" />111</then>112</if>113</target>114115</project>116117118