Path: blob/master/test/functional/cmdLineTests/shareClassTests/DataHelperTests/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="DataHelperTests" default="build" basedir=".">25<taskdef resource="net/sf/antcontrib/antlib.xml" />26<description>27Build DataHelperTests28</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/DataHelperTests" />34<property name="jarfile" value="${DEST}/DataHelperTests.jar" />35<property name="PROJECT_ROOT" location="." />36<property name="src" location="."/>37<property name="build" location="./bin"/>3839<target name="init">40<mkdir dir="${DEST}" />41<mkdir dir="${build}" />42</target>4344<target name="compile" depends="init" description="Compile the source" >45<echo>Ant version is ${ant.version}</echo>46<echo>============COMPILER SETTINGS============</echo>47<echo>===fork: yes</echo>48<echo>===executable: ${compiler.javac}</echo>49<echo>===debug: on</echo>50<echo>===destdir: ${DEST}</echo>5152<!--531.) Copy config files and java ...54-->55<copy todir="${build}">56<fileset dir="${src}" includes="*.bat,*.xml,*.policy" excludes="playlist.xml" />57</copy>58<!--592.) datacaching directory ...60-->61<trycatch>62<try>63<mkdir dir="${build}/datacaching"/>64</try>65<catch>66<sleep milliseconds="10"/>67<mkdir dir="${build}/datacaching"/>68</catch>69</trycatch>7071<trycatch>72<try>73<mkdir dir="${build}/datacaching/dataone.contents"/>74</try>75<catch>76<sleep milliseconds="10"/>77<mkdir dir="${build}/datacaching/dataone.contents"/>78</catch>79</trycatch>8081<trycatch>82<try>83<mkdir dir="${build}/datacaching/datatwo.contents"/>84</try>85<catch>86<sleep milliseconds="10"/>87<mkdir dir="${build}/datacaching/datatwo.contents"/>88</catch>89</trycatch>9091<copy todir="${build}/datacaching/dataone.contents">92<fileset dir="./datacaching/dataone.contents"/>93</copy>94<copy todir="${build}/datacaching/datatwo.contents">95<fileset dir="./datacaching/datatwo.contents"/>96</copy>9798<if>99<equals arg1="${JDK_VERSION}" arg2="8"/>100<then>101<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1" >102<src path="${src}" />103</javac>104</then>105<else>106<property name="addExports" value="--add-modules openj9.sharedclasses" />107<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1" >108<src path="${src}" />109<compilerarg line='${addExports}' />110</javac>111</else>112</if>113</target>114115<target name="dist" depends="compile" description="generate the distribution">116<jar jarfile="${jarfile}" filesonly="true">117<fileset dir="${build}" />118</jar>119<copy todir="${DEST}">120<fileset dir="${src}" includes="*.xml" />121<fileset dir="${src}" includes="*.mk" />122</copy>123</target>124125<target name="clean" depends="dist" description="clean up">126<!-- Delete the ${build} directory trees -->127<delete dir="${build}" />128</target>129130<target name="check-jar">131<available file="${jarfile}" property="jar.exist"/>132</target>133134<target name="build" depends="check-jar,buildCmdLineTestTools" unless="jar.exist">135<if>136<or>137<equals arg1="${JDK_IMPL}" arg2="ibm" />138<equals arg1="${JDK_IMPL}" arg2="openj9" />139</or>140<then>141<antcall target="clean" inheritall="true" />142</then>143</if>144</target>145</project>146147148