Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shareClassTests/DataHelperTests/build.xml
6004 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="DataHelperTests" default="build" basedir=".">
26
<taskdef resource="net/sf/antcontrib/antlib.xml" />
27
<description>
28
Build DataHelperTests
29
</description>
30
31
<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/>
32
33
<!-- set properties for this build -->
34
<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/shareClassTests/DataHelperTests" />
35
<property name="jarfile" value="${DEST}/DataHelperTests.jar" />
36
<property name="PROJECT_ROOT" location="." />
37
<property name="src" location="."/>
38
<property name="build" location="./bin"/>
39
40
<target name="init">
41
<mkdir dir="${DEST}" />
42
<mkdir dir="${build}" />
43
</target>
44
45
<target name="compile" depends="init" description="Compile the source" >
46
<echo>Ant version is ${ant.version}</echo>
47
<echo>============COMPILER SETTINGS============</echo>
48
<echo>===fork: yes</echo>
49
<echo>===executable: ${compiler.javac}</echo>
50
<echo>===debug: on</echo>
51
<echo>===destdir: ${DEST}</echo>
52
53
<!--
54
1.) Copy config files and java ...
55
-->
56
<copy todir="${build}">
57
<fileset dir="${src}" includes="*.bat,*.xml,*.policy" excludes="playlist.xml" />
58
</copy>
59
<!--
60
2.) datacaching directory ...
61
-->
62
<trycatch>
63
<try>
64
<mkdir dir="${build}/datacaching"/>
65
</try>
66
<catch>
67
<sleep milliseconds="10"/>
68
<mkdir dir="${build}/datacaching"/>
69
</catch>
70
</trycatch>
71
72
<trycatch>
73
<try>
74
<mkdir dir="${build}/datacaching/dataone.contents"/>
75
</try>
76
<catch>
77
<sleep milliseconds="10"/>
78
<mkdir dir="${build}/datacaching/dataone.contents"/>
79
</catch>
80
</trycatch>
81
82
<trycatch>
83
<try>
84
<mkdir dir="${build}/datacaching/datatwo.contents"/>
85
</try>
86
<catch>
87
<sleep milliseconds="10"/>
88
<mkdir dir="${build}/datacaching/datatwo.contents"/>
89
</catch>
90
</trycatch>
91
92
<copy todir="${build}/datacaching/dataone.contents">
93
<fileset dir="./datacaching/dataone.contents"/>
94
</copy>
95
<copy todir="${build}/datacaching/datatwo.contents">
96
<fileset dir="./datacaching/datatwo.contents"/>
97
</copy>
98
99
<if>
100
<equals arg1="${JDK_VERSION}" arg2="8"/>
101
<then>
102
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1" >
103
<src path="${src}" />
104
</javac>
105
</then>
106
<else>
107
<property name="addExports" value="--add-modules openj9.sharedclasses" />
108
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1" >
109
<src path="${src}" />
110
<compilerarg line='${addExports}' />
111
</javac>
112
</else>
113
</if>
114
</target>
115
116
<target name="dist" depends="compile" description="generate the distribution">
117
<jar jarfile="${jarfile}" filesonly="true">
118
<fileset dir="${build}" />
119
</jar>
120
<copy todir="${DEST}">
121
<fileset dir="${src}" includes="*.xml" />
122
<fileset dir="${src}" includes="*.mk" />
123
</copy>
124
</target>
125
126
<target name="clean" depends="dist" description="clean up">
127
<!-- Delete the ${build} directory trees -->
128
<delete dir="${build}" />
129
</target>
130
131
<target name="check-jar">
132
<available file="${jarfile}" property="jar.exist"/>
133
</target>
134
135
<target name="build" depends="check-jar,buildCmdLineTestTools" unless="jar.exist">
136
<if>
137
<or>
138
<equals arg1="${JDK_IMPL}" arg2="ibm" />
139
<equals arg1="${JDK_IMPL}" arg2="openj9" />
140
</or>
141
<then>
142
<antcall target="clean" inheritall="true" />
143
</then>
144
</if>
145
</target>
146
</project>
147
148