forked from CS-SI/Orekit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
236 lines (209 loc) · 16.5 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version="1.0" encoding="UTF-8"?>
<project name="orekit" default="jar" basedir=".">
<property name="project.version" value="11.3" />
<property name="src.dir" location="src" />
<property name="main.src.dir" value="${src.dir}/main/java" />
<property name="main.resources.dir" value="${src.dir}/main/resources" />
<property name="test.src.dir" value="${src.dir}/test/java" />
<property name="test.resources.dir" value="${src.dir}/test/resources" />
<property name="build.dir" location="build" />
<property name="main.classes.dir" value="${build.dir}/classes" />
<property name="test.classes.dir" value="${build.dir}/test-classes" />
<property name="javadoc.dir" value="${build.dir}/javadoc" />
<property name="tests.reports" value="${build.dir}/test-reports" />
<property name="lib.dir" location="lib" />
<property name="hipparchus.version" value="2.3" />
<property name="hipparchus.core.jar" value="hipparchus-core-${hipparchus.version}.jar" />
<property name="hipparchus.geometry.jar" value="hipparchus-geometry-${hipparchus.version}.jar" />
<property name="hipparchus.ode.jar" value="hipparchus-ode-${hipparchus.version}.jar" />
<property name="hipparchus.fitting.jar" value="hipparchus-fitting-${hipparchus.version}.jar" />
<property name="hipparchus.optim.jar" value="hipparchus-optim-${hipparchus.version}.jar" />
<property name="hipparchus.filtering.jar" value="hipparchus-filtering-${hipparchus.version}.jar" />
<property name="hipparchus.stat.jar" value="hipparchus-stat-${hipparchus.version}.jar" />
<property name="hipparchus.maven.path" value="org/hipparchus" />
<property name="junit-jupiter.version" value="5.9.1" />
<property name="junit-jupiter-api.jar" value="junit-jupiter-api-${junit-jupiter.version}.jar" />
<property name="junit-jupiter-api.maven.path" value="org/junit/jupiter/junit-jupiter-api" />
<property name="junit-jupiter-engine.jar" value="junit-jupiter-engine-${junit-jupiter.version}.jar" />
<property name="junit-jupiter-engine.maven.path" value="org/junit/jupiter/junit-jupiter-engine" />
<property name="junit-platform.version" value="1.9.0" />
<property name="junit-platform-engine.jar" value="junit-platform-engine-${junit-platform.version}.jar"/>
<property name="junit-platform-engine.maven.path" value="org/junit/platform/junit-platform-engine" />
<property name="junit-platform-commons.jar" value="junit-platform-commons-${junit-platform.version}.jar" />
<property name="junit-platform-commons.maven.path" value="org/junit/platform/junit-platform-commons" />
<property name="junit-platform-launcher.jar" value="junit-platform-launcher-${junit-platform.version}.jar"/>
<property name="junit-platform-launcher.maven.path" value="org/junit/platform/junit-platform-launcher" />
<property name="opentest4j.version" value="1.2.0" />
<property name="opentest4j.jar" value="opentest4j-${opentest4j.version}.jar" />
<property name="opentest4j.maven.path" value="org/opentest4j/opentest4j" />
<property name="apiguardian-api.version" value="1.1.2" />
<property name="apiguardian-api.jar" value="apiguardian-api-${apiguardian-api.version}.jar" />
<property name="apiguardian-api.maven.path" value="org/apiguardian/apiguardian-api" />
<property name="mockito.version" value="4.8.1" />
<property name="mockito.jar" value="mockito-core-${mockito.version}.jar" />
<property name="mockito.maven.path" value="org/mockito/mockito-core" />
<property name="bytebuddy.version" value="1.12.16" />
<property name="bytebuddy.jar" value="byte-buddy-${bytebuddy.version}.jar" />
<property name="bytebuddy.maven.path" value="net/bytebuddy/byte-buddy" />
<property name="bytebuddy.agent.jar" value="byte-buddy-agent-${bytebuddy.version}.jar" />
<property name="bytebuddy.agent.maven.path" value="net/bytebuddy/byte-buddy-agent" />
<property name="objenesis.version" value="3.2" />
<property name="objenesis.jar" value="objenesis-${objenesis.version}.jar" />
<property name="objenesis.maven.path" value="org/objenesis/objenesis" />
<property name="hamcrest.version" value="2.2" />
<property name="hamcrest.jar" value="hamcrest-${hamcrest.version}.jar" />
<property name="hamcrest.maven.path" value="org/hamcrest/hamcrest" />
<property name="maven.repository" value="https://repo1.maven.org/maven2" />
<!-- Path to $JAVA_HOME/lib/tools.jar for compiler plugin -->
<property name="tools.jar" value="tools.jar" />
<property name="tools.path" value="lib" />
<property name="copyright" value="2002-2022 CS GROUP" />
<property environment="env"/>
<available file="${lib.dir}/${hipparchus.core.jar}" property="libs.present" />
<target name="clean" description="Clean the build directory">
<delete dir="${build.dir}"/>
</target>
<target name="clean-lib" description="Clean the lib directory">
<delete dir="${lib.dir}"/>
</target>
<target name="clean-all" depends="clean,clean-lib"
description="Clean the build and lib directories">
</target>
<target name="get-libs" description="Get libraries" unless="libs.present">
<!-- if you need to set up a proxy to download artifacts,
uncomment and edit the following setproxy task -->
<!-- <setproxy proxyhost="my-proxy.my-company.com" proxyport="8080"
proxyUser="username" proxyPassword="password"/> -->
<mkdir dir="${lib.dir}"/>
<mkdir dir="${lib.dir}/jupiter"/>
<mkdir dir="${lib.dir}/junit-platform"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-core/${hipparchus.version}/${hipparchus.core.jar}"
dest="${lib.dir}/${hipparchus.core.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-geometry/${hipparchus.version}/${hipparchus.geometry.jar}"
dest="${lib.dir}/${hipparchus.geometry.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-ode/${hipparchus.version}/${hipparchus.ode.jar}"
dest="${lib.dir}/${hipparchus.ode.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-fitting/${hipparchus.version}/${hipparchus.fitting.jar}"
dest="${lib.dir}/${hipparchus.fitting.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-optim/${hipparchus.version}/${hipparchus.optim.jar}"
dest="${lib.dir}/${hipparchus.optim.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-filtering/${hipparchus.version}/${hipparchus.filtering.jar}"
dest="${lib.dir}/${hipparchus.filtering.jar}"/>
<get src="${maven.repository}/${hipparchus.maven.path}/hipparchus-stat/${hipparchus.version}/${hipparchus.stat.jar}"
dest="${lib.dir}/${hipparchus.stat.jar}"/>
<get src="${maven.repository}/${junit-jupiter-api.maven.path}/${junit-jupiter.version}/${junit-jupiter-api.jar}"
dest="${lib.dir}/jupiter/${junit-jupiter-api.jar}"/>
<get src="${maven.repository}/${junit-jupiter-engine.maven.path}/${junit-jupiter.version}/${junit-jupiter-engine.jar}"
dest="${lib.dir}/jupiter/${junit-jupiter-engine.jar}"/>
<get src="${maven.repository}/${junit-platform-engine.maven.path}/${junit-platform.version}/${junit-platform-engine.jar}"
dest="${lib.dir}/junit-platform/${junit-platform-engine.jar}"/>
<get src="${maven.repository}/${junit-platform-commons.maven.path}/${junit-platform.version}/${junit-platform-commons.jar}"
dest="${lib.dir}/junit-platform/${junit-platform-commons.jar}"/>
<get src="${maven.repository}/${junit-platform-launcher.maven.path}/${junit-platform.version}/${junit-platform-launcher.jar}"
dest="${lib.dir}/junit-platform/${junit-platform-launcher.jar}"/>
<get src="${maven.repository}/${opentest4j.maven.path}/${opentest4j.version}/${opentest4j.jar}"
dest="${lib.dir}/junit-platform/${opentest4j.jar}"/>
<get src="${maven.repository}/${hamcrest.maven.path}/${hamcrest.version}/${hamcrest.jar}"
dest="${lib.dir}/${hamcrest.jar}"/>
<get src="${maven.repository}/${apiguardian-api.maven.path}/${apiguardian-api.version}/${apiguardian-api.jar}"
dest="${lib.dir}/${apiguardian-api.jar}"/>
<get src="${maven.repository}/${mockito.maven.path}/${mockito.version}/${mockito.jar}"
dest="${lib.dir}/${mockito.jar}"/>
<get src="${maven.repository}/${bytebuddy.maven.path}/${bytebuddy.version}/${bytebuddy.jar}"
dest="${lib.dir}/${bytebuddy.jar}"/>
<get src="${maven.repository}/${bytebuddy.agent.maven.path}/${bytebuddy.version}/${bytebuddy.agent.jar}"
dest="${lib.dir}/${bytebuddy.agent.jar}"/>
<get src="${maven.repository}/${objenesis.maven.path}/${objenesis.version}/${objenesis.jar}"
dest="${lib.dir}/${objenesis.jar}"/>
<copy file="${env.JAVA_HOME}/${tools.path}/${tools.jar}"
tofile="${lib.dir}/${tools.jar}"/>
</target>
<target name="compile" depends="get-libs" description="Compile the code">
<mkdir dir="${main.classes.dir}"/>
<javac srcdir="${main.src.dir}" destdir="${main.classes.dir}" includeantruntime="false"
classpath="${lib.dir}/${tools.jar}:${lib.dir}/${hipparchus.core.jar}:${lib.dir}/${hipparchus.geometry.jar}:${lib.dir}/${hipparchus.ode.jar}:${lib.dir}/${hipparchus.fitting.jar}:${lib.dir}/${hipparchus.optim.jar}:${lib.dir}/${hipparchus.stat.jar}:${lib.dir}/${hipparchus.filtering.jar}"
deprecation="true" target="1.8" source="1.8" encoding="utf-8">
</javac>
<copy todir="${main.classes.dir}">
<fileset dir="${main.resources.dir}"/>
</copy>
</target>
<target name="compile-tests" depends="compile" description="Compile the test code" >
<mkdir dir="${test.classes.dir}"/>
<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}" includeantruntime="false"
classpath="${main.classes.dir}:${lib.dir}/${tools.jar}:${lib.dir}/jupiter/${junit-jupiter-api.jar}:${lib.dir}/jupiter/${junit-jupiter-engine.jar}:${lib.dir}/junit-platform/${junit-platform-commons.jar}:${lib.dir}/junit-platform/${junit-platforms-engine.jar}:${lib.dir}/junit-platform/${junit-platform-launcher.jar}:${lib.dir}/junit-platform/${opentest4j.jar}:${lib.dir}/${hamcrest.jar}:${lib.dir}/${hipparchus.core.jar}:${lib.dir}/${hipparchus.geometry.jar}:${lib.dir}/${hipparchus.ode.jar}:${lib.dir}/${hipparchus.fitting.jar}:${lib.dir}/${hipparchus.optim.jar}:${lib.dir}/${hipparchus.filtering.jar}:${lib.dir}/${hipparchus.stat.jar}:${lib.dir}/${apiguardian-api.jar}:${lib.dir}/${bytebuddy.jar}:{lib.dir}/${bytebuddy.agent.jar}:${lib.dir}/${mockito.jar}"
deprecation="true" target="1.8" source="1.8" encoding="utf-8">
</javac>
<copy todir="${test.classes.dir}">
<fileset dir="${test.resources.dir}"/>
</copy>
</target>
<path id="junit.platform.libs.classpath">
<fileset dir="${lib.dir}/junit-platform/"/>
</path>
<path id="junit.engine.jupiter.classpath">
<fileset dir="${lib.dir}/jupiter/"/>
</path>
<target name="test" depends="compile-tests" description="Run the tests">
<mkdir dir="${tests.reports}"/>
<junitlauncher printSummary="true" haltOnFailure="true">
<!-- include the JUnit Jupiter engine libraries -->
<classpath refid="junit.engine.jupiter.classpath"/>
<!-- include the JUnit platform related libraries
required to run the tests -->
<classpath refid="junit.platform.libs.classpath"/>
<classpath>
<pathelement location="${main.classes.dir}" />
<pathelement location="${test.classes.dir}" />
<pathelement location="${lib.dir}/${hipparchus.core.jar}" />
<pathelement location="${lib.dir}/${hipparchus.geometry.jar}" />
<pathelement location="${lib.dir}/${hipparchus.ode.jar}" />
<pathelement location="${lib.dir}/${hipparchus.fitting.jar}" />
<pathelement location="${lib.dir}/${hipparchus.optim.jar}" />
<pathelement location="${lib.dir}/${hipparchus.stat.jar}" />
<pathelement location="${lib.dir}/${junit-jupiter-api.jar}" />
<pathelement location="${lib.dir}/${junit-jupiter-engine.jar}"/>
<pathelement location="${lib.dir}/${junit-platform-commons.jar}" />
<pathelement location="${lib.dir}/${junit-platform-engine.jar}" />
<pathelement location="${lib.dir}/${junit-platform-launcher.jar}" />
<pathelement location="${lib.dir}/${opentest4j.jar}" />
<pathelement location="${lib.dir}/${hamcrest.jar}" />
<pathelement location="${lib.dir}/${hipparchus.filtering.jar}"/>
<pathelement location="${lib.dir}/${mockito.jar}" />
<pathelement location="${lib.dir}/${objenesis.jar}" />
<pathelement location="${lib.dir}/${bytebuddy.jar}" />
<pathelement location="${lib.dir}/${bytebuddy.agent.jar}" />
<pathelement location="${lib.dir}/${tools.jar}" />
</classpath>
<testclasses outputDir="${tests.reports}">
<fork includeJUnitPlatformLibraries="false">
</fork>
<listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/>
<fileset dir="${test.classes.dir}">
<include name="org/orekit/**/*Test.class"/>
<exclude name="org/orekit/**/*Abstract*.class"/>
</fileset>
</testclasses>
</junitlauncher>
<junitreport todir="${tests.reports}">
<fileset dir="${tests.reports}">
<include name="*.xml"/>
</fileset>
<report format="frames" todir="${tests.reports}/html"/>
</junitreport>
</target>
<target name="jar" depends="compile,test" description="create the jar file">
<jar jarfile="${build.dir}/${ant.project.name}-${project.version}.jar"
basedir="${main.classes.dir}"/>
</target>
<target name="javadoc" description="create javadoc">
<javadoc sourcepath="${main.src.dir}" destdir="${javadoc.dir}"
overview="${main.src.dir}/org/orekit/overview.html"
encoding="UTF-8" version="true" use="true" author="true"
charset="UTF-8" docencoding="UTF-8"
bottom="<i>Copyright © ${copyright}. All Rights Reserved.</i>">
<link href="http://docs.oracle.com/javase/8/docs/api/"/>
<link href="https://www.hipparchus.org/apidocs/"/>
</javadoc>
</target>
</project>