Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdline_options_testresources/build.xml
6000 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (c) 2016, 2021 IBM Corp. and others
5
6
This program and the accompanying materials are made available under
7
the terms of the Eclipse Public License 2.0 which accompanies this
8
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
or the Apache License, Version 2.0 which accompanies this distribution and
10
is available at https://www.apache.org/licenses/LICENSE-2.0.
11
12
This Source Code may also be made available under the following
13
Secondary Licenses when the conditions for such availability set
14
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
General Public License, version 2 with the GNU Classpath
16
Exception [1] and GNU General Public License, version 2 with the
17
OpenJDK Assembly Exception [2].
18
19
[1] https://www.gnu.org/software/classpath/license.html
20
[2] http://openjdk.java.net/legal/assembly-exception.html
21
22
SPDX-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-exception
23
-->
24
25
<project name="cmdline_options_testresources tests" default="build" basedir=".">
26
<taskdef resource='net/sf/antcontrib/antlib.xml'/>
27
<description>
28
Build cmdline_options_testresources
29
</description>
30
31
<!-- set global properties for this build -->
32
<property name="DEST" value="${BUILD_ROOT}/functional/cmdline_options_testresources" />
33
<property name="jarfile" value="${DEST}/cmdlinetestresources.jar" />
34
35
<!--Properties for this particular build-->
36
<property name="src" location="./src"/>
37
<property name="src_80" location="./src_80"/>
38
<property name="src_90" location="./src_90"/>
39
<property name="build" location="./bin"/>
40
<property name="TestUtilities" location="../TestUtilities/src"/>
41
42
<target name="init">
43
<mkdir dir="${DEST}" />
44
<mkdir dir="${build}"/>
45
</target>
46
47
<target name="compile" depends="init" description="compile the source " >
48
<echo>Ant version is ${ant.version}</echo>
49
<echo>============COMPILER SETTINGS============</echo>
50
<echo>===fork: yes</echo>
51
<echo>===executable: ${compiler.javac}</echo>
52
<echo>===debug: on</echo>
53
<echo>===destdir: ${DEST}</echo>
54
55
56
<if>
57
<equals arg1="${JDK_VERSION}" arg2="8"/>
58
<then>
59
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
60
<src path="${src}" />
61
<src path="${src_80}" />
62
</javac>
63
</then>
64
<else>
65
<if>
66
<equals arg1="${JCL_VERSION}" arg2="latest"/>
67
<then>
68
<property name="addExports" value="--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED" />
69
</then>
70
<else>
71
<property name="addExports" value='--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED' />
72
</else>
73
</if>
74
<javac srcdir="${src}" destdir="${build}" source="1.9" target="1.9" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
75
<src path="${src}" />
76
<src path="${src_90}" />
77
<src path="${TestUtilities}" />
78
<compilerarg line='${addExports}' />
79
<classpath>
80
<pathelement location="${LIB_DIR}/testng.jar"/>
81
</classpath>
82
</javac>
83
</else>
84
</if>
85
</target>
86
87
<target name="dist" depends="compile" description="generate the distribution" >
88
<!-- Store all class files in cmdlinetestresources.jar file -->
89
<jar jarfile="${jarfile}" filesonly="true">
90
<fileset dir="${build}"/>
91
<fileset dir="${src}"/>
92
</jar>
93
<copy todir="${DEST}">
94
<fileset dir="${src}/../" includes="*.xml" />
95
</copy>
96
</target>
97
98
<target name="check-jar">
99
<available file="${jarfile}" property="jar.exist"/>
100
</target>
101
102
<target name="clean" depends="dist" description="clean up" >
103
<!-- Delete the ${build} directory trees -->
104
<delete dir="${build}"/>
105
</target>
106
107
<target name="build" depends="check-jar" unless="jar.exist">
108
<if>
109
<or>
110
<equals arg1="${JDK_IMPL}" arg2="ibm" />
111
<equals arg1="${JDK_IMPL}" arg2="openj9" />
112
</or>
113
<then>
114
<antcall target="clean" inheritall="true" />
115
</then>
116
</if>
117
</target>
118
</project>
119
120