-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
211 lines (188 loc) · 7.68 KB
/
build.xml
File metadata and controls
211 lines (188 loc) · 7.68 KB
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
<?xml version="1.0"?>
<project name="cope im4java" default="build" basedir="."
xmlns:if="ant:if"
xmlns:unless="ant:unless">
<echo taskname="which ant" message="${ant.version}" />
<echo taskname="which java" message="${java.vm.name} ${java.version}" />
<!--suppress AntMissingPropertiesFileInspection -->
<property file="local.properties" />
<property file="project.properties" />
<import>
<fileset dir="macros">
<include name="*.xml" />
</fileset>
</import>
<taskdef resource="com/exedio/cope/instrument/ant.properties" onerror="failall">
<classpath>
<pathelement location="lib/slf4j-api.jar" />
<pathelement location="lib/jakarta.servlet-api.jar" />
<pathelement location="lib/exedio-cope.jar" />
<pathelement location="lib/exedio-cope-instrument.jar" />
<pathelement location="lib/exedio-cope-instrument-annotations.jar" />
<pathelement location="lib/exedio-cope-util.jar" />
<pathelement location="lib/micrometer-core.jar" />
</classpath>
</taskdef>
<target name="src.compile">
<compile srcdir="src">
<classpath>
<pathelement location="lib/exedio-cope.jar" />
<pathelement location="lib/im4java.jar" />
<pathelement location="lib/jakarta.servlet-api.jar" />
<pathelement location="lib/exedio-cope-instrument-annotations.jar" />
<pathelement location="lib/annotations.jar" />
</classpath>
</compile>
</target>
<target name="testsrc.instrument" depends="src.compile" unless="skip.instrument">
<!--
build faster with "ant -Dskip.instrument=true",
if you know, no instrumentation is needed
-->
<instrument
dir="${basedir}/testsrc"
verify="${instrument.verify}">
<classpath>
<pathelement location="build/classes/src" />
<pathelement location="lib/im4java.jar" />
<pathelement location="lib/junit-jupiter-api.jar" />
<pathelement location="lib/apiguardian-api.jar" />
</classpath>
<suppressWarnings>
<wrapper>FinalMethodInFinalClass</wrapper>
<wrapper>RedundantSuppression</wrapper>
<wrapper>UnnecessarilyQualifiedStaticUsage</wrapper>
</suppressWarnings>
</instrument>
</target>
<target name="testsrc.compile" depends="src.compile, testsrc.instrument">
<compile srcdir="testsrc">
<classpath>
<pathelement location="build/classes/src" />
<pathelement location="lib/exedio-cope.jar" />
<pathelement location="lib/exedio-cope-util.jar" />
<pathelement location="lib/im4java.jar" />
<pathelement location="lib/jakarta.servlet-api.jar" />
<pathelement location="lib/exedio-cope-instrument-annotations.jar" />
<pathelement location="lib/annotations.jar" />
<pathelement location="lib/junit-jupiter-api.jar" />
<pathelement location="lib/apiguardian-api.jar" />
<pathelement location="lib/opentest4j.jar" />
</classpath>
</compile>
</target>
<target name="test.run" depends="testsrc.compile">
<mkdir dir="build/testresults" />
<mkdir dir="build/testtmpdir" />
<fail if:set="method" unless:set="test">'method' requires 'test'</fail>
<java taskname="junit" fork="yes" dir="${basedir}"
failonerror="true"
classname="org.junit.platform.console.ConsoleLauncher">
<arg line="--details ${test-details}" />
<arg line="--disable-ansi-colors" if:set="disable-ansi-colors" />
<classpath>
<pathelement location="build/classes/src" />
<pathelement location="build/classes/testsrc" />
<pathelement location="lib/exedio-cope-util.jar" />
<pathelement location="lib/exedio-cope.jar" />
<pathelement location="lib/exedio-cope-hsqldb.jar" />
<pathelement location="lib/im4java.jar" />
<pathelement location="lib/jakarta.servlet-api.jar" />
<pathelement location="lib/slf4j-api.jar" />
<pathelement location="lib/micrometer-core.jar" />
<pathelement location="lib/trove4j.jar" />
<pathelement location="lib/LatencyUtils.jar" />
<pathelement location="lib/hsqldb.jar" />
<pathelement location="lib/junit-jupiter-api.jar" />
<pathelement location="lib/junit-jupiter-engine.jar" />
<pathelement location="lib/apiguardian-api.jar" />
<pathelement location="lib/opentest4j.jar" />
<pathelement location="lib/junit-platform-commons.jar" />
<pathelement location="lib/junit-platform-engine.jar" />
<pathelement location="lib/junit-platform-launcher.jar" />
<pathelement location="lib/junit-platform-console.jar" />
</classpath>
<arg line="--fail-if-no-tests" />
<arg line="--scan-class-path build/classes/testsrc" unless:set="test" />
<arg line="--select-class ${test}" if:set="test" unless:set="method"/>
<arg line="--select-method ${test}#${method}" if:set="method" />
<arg line="--reports-dir build/testresults" />
<sysproperty key="java.io.tmpdir" value="${basedir}/build/testtmpdir" />
<sysproperty key="github" value="${github}" />
<assertions><enable/></assertions>
</java>
</target>
<target name="test" depends="test.run" />
<target name="jar" depends="src.compile">
<jar jarfile="build/exedio-cope-im4java.jar" basedir="build/classes/src" filesonly="true" duplicate="fail" strict="fail" level="9">
<manifest>
<attribute name="Specification-Title" value="exedio cope im4java"/>
<attribute name="Specification-Version" value="${build.tag}"/>
<attribute name="Specification-Vendor" value="exedio GmbH"/>
<attribute name="Implementation-Title" value="exedio cope im4java"/>
<attribute name="Implementation-Version" value="${build.tag}"/>
<attribute name="Implementation-Vendor" value="exedio GmbH"/>
</manifest>
</jar>
<plot file="build/exedio-cope-im4java.jar" />
</target>
<target name="jar.src">
<mkdir dir="build" />
<zip destfile="build/exedio-cope-im4java-src.zip" filesonly="true" whenempty="fail" duplicate="fail" level="9">
<zipfileset dir="${basedir}/src">
<include name="**/*.java" />
</zipfileset>
</zip>
<plot file="build/exedio-cope-im4java-src.zip" />
</target>
<target name="clean">
<delete dir="build" />
<delete dir="api" /><!-- not created anymore-->
</target>
<target name="api">
<delete dir="build/api" />
<mkdir dir="build/api" />
<javadoc
sourcepath="src"
destdir="build/api"
maxmemory="60m"
author="on"
use="on"
version="on"
windowtitle="exedio cope im4java"
splitindex="on"
failonerror="true"
>
<doctitle><![CDATA[COPE Utilities<br>API Specification]]></doctitle>
<header>exedio cope im4java</header>
<footer>exedio cope im4java</footer>
<bottom><![CDATA[<small>Copyright © 2004-2008 <a href="https://www.exedio.com/" target="_top">exedio</a> Gesellschaft für Softwareentwicklung mbH. All rights reserved.</small><br><font size="-3">${build.tag}</font>]]></bottom>
<package name="com.*" />
<arg value="-Xdoclint:all,-missing" />
<classpath>
<pathelement location="lib/exedio-cope.jar" />
<pathelement location="lib/im4java.jar" />
<pathelement location="lib/jakarta.servlet-api.jar" />
<pathelement location="lib/exedio-cope-instrument-annotations.jar" />
</classpath>
</javadoc>
</target>
<target name="build" depends="src.compile, test, jar, api" />
<target name="all" depends="build, jar.src" />
<target name="jenkins" depends="all">
<copy todir="${basedir}/build/success">
<fileset file="${basedir}/build/exedio-cope-im4java.jar" />
<fileset file="${basedir}/build/exedio-cope-im4java-src.zip" />
<fileset file="${basedir}/exedio-cope-im4java-log.txt" />
</copy>
<copy file="ivy/ivy.xml" todir="build/success" overwrite="true">
<filterset>
<filter token="BUILD_REVISION" value="${build.revision}" />
<filter token="BUILD_STATUS" value="${build.status}" />
</filterset>
</copy>
</target>
<target name="publishlocally" depends="jar, jar.src">
<ant dir="ivy" target="publishlocally" />
</target>
</project>