Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/JLM_Tests/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="JLM_Tests" default="build" basedir=".">
26
27
<description>
28
Build JLM Tests
29
</description>
30
31
<!-- Set global properties for this build. -->
32
<property name="DEST" value="${BUILD_ROOT}/functional/JLM_Tests" />
33
34
<property name="src" location="./src" />
35
<property name="src_80" location="./src_80" />
36
<property name="src_90" location="./src_90" />
37
<property name="build" location="./bin" />
38
<property name="transformerListener" location="${TEST_ROOT}/Utils/src"/>
39
<property name="TestUtilities" location="../TestUtilities/src"/>
40
<property name="LIB" value="jcommander,commons_exec,testng"/>
41
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/>
42
43
<target name="init">
44
<fail message="BUILD_ROOT must be defined." unless="BUILD_ROOT" />
45
<mkdir dir="${DEST}" />
46
<mkdir dir="${build}" />
47
</target>
48
49
<target name="compile" depends="init,getDependentLibs" description="using java ${JDK_VERSION} to compile the source ">
50
<echo>Ant version is ${ant.version}</echo>
51
<echo>============COMPILER SETTINGS============</echo>
52
<echo>===fork: yes</echo>
53
<echo>===executable: ${compiler.javac}</echo>
54
<echo>===debug: on</echo>
55
<echo>===destdir: ${build}</echo>
56
57
<if>
58
<equals arg1="${JDK_VERSION}" arg2="8"/>
59
<then>
60
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
61
<src path="${src}" />
62
<src path="${src_80}" />
63
<src path="${transformerListener}" />
64
<src path="${TestUtilities}" />
65
<classpath>
66
<pathelement location="${LIB_DIR}/testng.jar" />
67
<pathelement location="${LIB_DIR}/jcommander.jar" />
68
<pathelement location="${LIB_DIR}/commons-exec.jar" />
69
<pathelement location="${TEST_JDK_HOME}/lib/tools.jar" />
70
</classpath>
71
</javac>
72
</then>
73
<else>
74
<if>
75
<equals arg1="${JCL_VERSION}" arg2="latest"/>
76
<then>
77
<property name="addExports" value="--add-exports java.management/com.ibm.java.lang.management.internal=ALL-UNNAMED --add-exports jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED --add-exports java.management/javax.management=ALL-UNNAMED --add-exports java.base/java.security=ALL-UNNAMED" />
78
</then>
79
<else>
80
<property name="addExports" value="--add-exports java.management/com.ibm.java.lang.management.internal=ALL-UNNAMED --add-exports jdk.management/com.ibm.lang.management.internal=ALL-UNNAMED --add-exports java.management/javax.management=ALL-UNNAMED --add-exports java.base/java.security=ALL-UNNAMED" />
81
</else>
82
</if>
83
<property name="TestUtilitiesExports" value="--add-exports java.base/openj9.internal.tools.attach.target=ALL-UNNAMED" />
84
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
85
<src path="${src}" />
86
<src path="${src_90}" />
87
<src path="${transformerListener}" />
88
<src path="${TestUtilities}" />
89
<compilerarg line='${addExports} ${TestUtilitiesExports}' />
90
<classpath>
91
<pathelement location="${LIB_DIR}/testng.jar" />
92
<pathelement location="${LIB_DIR}/jcommander.jar" />
93
<pathelement location="${LIB_DIR}/commons-exec.jar" />
94
</classpath>
95
</javac>
96
</else>
97
</if>
98
</target>
99
100
<target name="dist" depends="compile" description="generate the distribution">
101
<!-- Store all class files in jlm-tests.jar file. -->
102
<mkdir dir="${DEST}"/>
103
<jar jarfile="${DEST}/jlm_tests.jar" filesonly="true">
104
<fileset dir="${build}"/>
105
<fileset dir="${src}"/>
106
<fileset dir="${src}/../" includes="*.properties,*.xml" />
107
</jar>
108
<copy todir="${DEST}">
109
<fileset dir="${src}/../" includes="*.xml" />
110
<fileset dir="${src}/../" includes="*.mk" />
111
</copy>
112
</target>
113
114
<target name="clean" depends="dist" description="clean up">
115
<!-- Delete the ${build} directory tree. -->
116
<delete dir="${build}"/>
117
</target>
118
119
<target name="build" >
120
<if>
121
<or>
122
<equals arg1="${JDK_IMPL}" arg2="ibm" />
123
<equals arg1="${JDK_IMPL}" arg2="openj9" />
124
</or>
125
<then>
126
<antcall target="clean" inheritall="true" />
127
</then>
128
</if>
129
</target>
130
</project>
131
132