Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shareClassTests/TokenHelperTests/build.xml
6004 views
1
<?xml version="1.0"?>
2
<!--
3
Copyright (c) 2005, 2021 IBM Corp. and others
4
5
This program and the accompanying materials are made available under
6
the terms of the Eclipse Public License 2.0 which accompanies this
7
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
or the Apache License, Version 2.0 which accompanies this distribution and
9
is available at https://www.apache.org/licenses/LICENSE-2.0.
10
11
This Source Code may also be made available under the following
12
Secondary Licenses when the conditions for such availability set
13
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
General Public License, version 2 with the GNU Classpath
15
Exception [1] and GNU General Public License, version 2 with the
16
OpenJDK Assembly Exception [2].
17
18
[1] https://www.gnu.org/software/classpath/license.html
19
[2] http://openjdk.java.net/legal/assembly-exception.html
20
21
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
22
-->
23
<project name="TokenHelperTests" default="build" basedir=".">
24
<taskdef resource='net/sf/antcontrib/antlib.xml'/>
25
<description>
26
Build TokenHelperTests
27
</description>
28
29
<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/>
30
31
<!-- set global properties for this build -->
32
<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/shareClassTests/TokenHelperTests" />
33
<property name="jarfile" value="${DEST}/TokenHelperTests.jar" />
34
<property name="src" location="."/>
35
<property name="build" location="./bin"/>
36
37
<!--Properties for this particular build-->
38
<property name="SharedClassUtils_srddir" value="../utils/src/" />
39
<property name="BatchFiles_srddir" value="../batchfiles/" />
40
41
<target name="init">
42
<mkdir dir="${DEST}" />
43
<mkdir dir="${build}" />
44
</target>
45
46
<import file="../testClasses/build.xml" />
47
<import file="../../../cmdline_options_tester/build.xml" />
48
49
<!--
50
NOTE: The below targets are overridden from cmdline_options_tester/build.xml
51
-->
52
<target name="-pre-package" depends="" description="copy multiple projects source">
53
</target>
54
55
<target name="AddBatchAndScriptFilesToPackage" >
56
<mkdir dir="${build}/batchfiles" />
57
<copy todir="${build}/batchfiles">
58
<fileset dir="${BatchFiles_srddir}"/>
59
</copy>
60
</target>
61
62
<target name="compile" depends="init,AddTestClassesToPackage,AddBatchAndScriptFilesToPackage" description="compile the source" >
63
<echo>Ant version is ${ant.version}</echo>
64
<!--
65
1.) Copy config files ...
66
-->
67
<copy todir="${build}">
68
<fileset dir="${src}" includes="*.xml" excludes="playlist.xml" />
69
</copy>
70
71
<!--
72
2.) APITests directory ...
73
-->
74
<mkdir dir="${build}/APITests"/>
75
<copy todir="${build}/APITests">
76
<fileset dir="${src}/APITests/"/>
77
</copy>
78
<if>
79
<equals arg1="${JDK_VERSION}" arg2="8"/>
80
<then>
81
<javac srcdir="${build}/APITests" destdir="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">
82
<src path="${SharedClassUtils_srddir}"/>
83
</javac>
84
</then>
85
<else>
86
<property name="addExports" value="--add-modules openj9.sharedclasses --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED" />
87
<javac srcdir="${build}/APITests" destdir="${build}" classpath="${build}" fork="true" debug="on" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1">
88
<src path="${SharedClassUtils_srddir}"/>
89
<compilerarg line='${addExports}' />
90
</javac>
91
</else>
92
</if>
93
94
<!--
95
3.) StaleMarkingTests directory ...
96
-->
97
<mkdir dir="${build}/StaleMarkingTests"/>
98
<copy todir="${build}/StaleMarkingTests">
99
<fileset dir="${src}/StaleMarkingTests/"/>
100
</copy>
101
<javac srcdir="${build}/StaleMarkingTests" destdir="${build}" debug="on" fork="true" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1" />
102
103
<!--
104
4.) TimeStampingTests directory ...
105
-->
106
<mkdir dir="${build}/TimeStampingTests"/>
107
<mkdir dir="${build}/TimeStampingTests/props_unix"/>
108
<mkdir dir="${build}/TimeStampingTests/props_win"/>
109
<copy todir="${build}/TimeStampingTests/">
110
<fileset dir="${src}/TimeStampingTests/"/>
111
</copy>
112
<copy todir="${build}/TimeStampingTests/props_unix">
113
<fileset dir="${src}/TimeStampingTests/props_unix"/>
114
</copy>
115
<copy todir="${build}/TimeStampingTests/props_win">
116
<fileset dir="${src}/TimeStampingTests/props_win"/>
117
</copy>
118
<javac srcdir="${build}/TimeStampingTests" destdir="${build}" debug="on" fork="true" debuglevel="lines,vars,source" executable="${compiler.javac}" encoding="ISO-8859-1" />
119
</target>
120
121
<target name="dist" depends="compile" description="generate the distribution">
122
<jar jarfile="${jarfile}" filesonly="true">
123
<fileset dir="${build}"/>
124
</jar>
125
<copy todir="${DEST}">
126
<fileset dir="${src}" />
127
<fileset dir="${src}" includes="*.mk" />
128
</copy>
129
</target>
130
131
<target name="clean" depends="dist" description="clean up">
132
<!-- Delete the ${build} directory trees -->
133
<delete dir="${build}" />
134
</target>
135
136
<target name="check-jar">
137
<available file="${jarfile}" property="jar.exist"/>
138
</target>
139
140
<target name="build" depends="check-jar,buildCmdLineTestTools" unless="jar.exist">
141
<if>
142
<or>
143
<equals arg1="${JDK_IMPL}" arg2="ibm" />
144
<equals arg1="${JDK_IMPL}" arg2="openj9" />
145
</or>
146
<then>
147
<antcall target="clean" inheritall="true" />
148
</then>
149
</if>
150
</target>
151
</project>
152
153