Debian Codegraph @

org.jacoco.doc/docroot/doc/build.html

raw
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <link rel="stylesheet" href="resources/doc.css" charset="UTF-8" type="text/css" />
7 <link rel="stylesheet" href="../coverage/jacoco-resources/prettify.css" charset="UTF-8" type="text/css" />
8 <link rel="shortcut icon" href="resources/report.gif" type="image/gif" />
9 <script type="text/javascript" src="../coverage/jacoco-resources/prettify.js"></script>
10 <title>JaCoCo - Build</title>
11 </head>
12 <body onload="prettyPrint()">
13
14 <div class="breadcrumb">
15 <a href="../index.html" class="el_report">JaCoCo</a> &gt;
16 <a href="index.html" class="el_group">Documentation</a> &gt;
17 <span class="el_source">Build</span>
18 </div>
19 <div id="content">
20
21 <h1>Build</h1>
22
23 <p>
24 The JaCoCo build is based on <a href="http://maven.apache.org/">Maven</a> and
25 can be locally executed on every machine with a proper
26 <a href="environment.html">environment setup</a>. In particular you need JDK 17
27 installation. Developers are encouraged to run the build before every commit
28 to ensure consistency of the source tree.
29 </p>
30
31
32 <h2>Running the Build</h2>
33
34 <p>
35 The build can be started by executing the
36 <a href="https://maven.apache.org/wrapper/">Maven Wrapper</a> using following
37 command with <code>./org.jacoco.build/</code> as the working directory:
38 </p>
39
40 <pre>
41 ../mvnw clean verify
42 </pre>
43
44 <p>
45 Total build time is typically around 3 minutes, however first build might take
46 more time, because Maven should download plugins and dependencies. The
47 download ZIP will be created at the following location:
48 </p>
49
50 <pre>
51 ../jacoco/target/jacoco-<i>x.y.z.qualifier</i>.zip
52 </pre>
53
54
55 <h2>Running Quick Build without Tests</h2>
56
57 <p>
58 It is not recommended, however possible to the run build without any tests:
59 </p>
60
61 <pre>
62 ../mvnw clean verify -DskipTests
63 </pre>
64
65
66 <h2>Compilation and testing with different JDKs</h2>
67
68 <p>
69 By default for compilation and execution of tests will be used JDK that runs
70 Maven. Alternatively you can use JDK from
71 <a href="http://maven.apache.org/guides/mini/guide-using-toolchains.html">Maven
72 Toolchains</a> by setting property <code>jdk.version</code>.
73 </p>
74
75 <p>
76 Following table shows in which classfile version modules will be compiled to
77 depending on version of JDK (empty cells = no compilation possible):
78 </p>
79
80 <table class="coverage">
81 <thead>
82 <tr>
83 <td>Modules</td>
84 <td>JDK 5</td>
85 <td>JDK 6</td>
86 <td>JDK 7</td>
87 <td>JDK 8</td>
88 <td>JDK 9</td>
89 <td>JDK 10</td>
90 <td>JDK 11</td>
91 <td>JDK 12</td>
92 <td>JDK 13</td>
93 <td>JDK 14</td>
94 <td>JDK 15</td>
95 <td>JDK 16</td>
96 <td>JDK 17</td>
97 <td>JDK 18</td>
98 <td>JDK 19</td>
99 <td>JDK 20</td>
100 <td>JDK 21</td>
101 <td>JDK 22</td>
102 <td>JDK 23</td>
103 <td>JDK 24</td>
104 <td>JDK 25</td>
105 <td>JDK 26</td>
106 </tr>
107 </thead>
108 <tbody>
109 <tr>
110 <td>org.jacoco.core.test.validation.java21</td>
111 <td></td>
112 <td></td>
113 <td></td>
114 <td></td>
115 <td></td>
116 <td></td>
117 <td></td>
118 <td></td>
119 <td></td>
120 <td></td>
121 <td></td>
122 <td></td>
123 <td></td>
124 <td></td>
125 <td></td>
126 <td></td>
127 <td>21</td>
128 <td>21</td>
129 <td>21</td>
130 <td>21</td>
131 <td>21</td>
132 <td>21</td>
133 </tr>
134 <tr>
135 <td>org.jacoco.core.test.validation.java16</td>
136 <td></td>
137 <td></td>
138 <td></td>
139 <td></td>
140 <td></td>
141 <td></td>
142 <td></td>
143 <td></td>
144 <td></td>
145 <td></td>
146 <td></td>
147 <td>16</td>
148 <td>16</td>
149 <td>16</td>
150 <td>16</td>
151 <td>16</td>
152 <td>16</td>
153 <td>16</td>
154 <td>16</td>
155 <td>16</td>
156 <td>16</td>
157 <td>16</td>
158 </tr>
159 <tr>
160 <td>org.jacoco.core.test.validation.java14</td>
161 <td></td>
162 <td></td>
163 <td></td>
164 <td></td>
165 <td></td>
166 <td></td>
167 <td></td>
168 <td></td>
169 <td></td>
170 <td>14</td>
171 <td>14</td>
172 <td>14</td>
173 <td>14</td>
174 <td>14</td>
175 <td>14</td>
176 <td>14</td>
177 <td>14</td>
178 <td>14</td>
179 <td>14</td>
180 <td>14</td>
181 <td>14</td>
182 <td>14</td>
183 </tr>
184 <tr>
185 <td>org.jacoco.core.test.validation.java8</td>
186 <td></td>
187 <td></td>
188 <td></td>
189 <td>8</td>
190 <td>8</td>
191 <td>8</td>
192 <td>8</td>
193 <td>8</td>
194 <td>8</td>
195 <td>8</td>
196 <td>8</td>
197 <td>8</td>
198 <td>8</td>
199 <td>8</td>
200 <td>8</td>
201 <td>8</td>
202 <td>8</td>
203 <td>8</td>
204 <td>8</td>
205 <td>8</td>
206 <td>8</td>
207 <td>8</td>
208 </tr>
209 <tr>
210 <td>org.jacoco.core.test.validation.java7</td>
211 <td></td>
212 <td></td>
213 <td>7</td>
214 <td>7</td>
215 <td>7</td>
216 <td>7</td>
217 <td>7</td>
218 <td>7</td>
219 <td>7</td>
220 <td>7</td>
221 <td>7</td>
222 <td>7</td>
223 <td>7</td>
224 <td>7</td>
225 <td>7</td>
226 <td>8</td>
227 <td>8</td>
228 <td>8</td>
229 <td>8</td>
230 <td>8</td>
231 <td>8</td>
232 <td>8</td>
233 </tr>
234 <tr>
235 <td>org.jacoco.core.test.validation.groovy</td>
236 <td></td>
237 <td></td>
238 <td></td>
239 <td>8</td>
240 <td>8</td>
241 <td>8</td>
242 <td>8</td>
243 <td>8</td>
244 <td>8</td>
245 <td>8</td>
246 <td>8</td>
247 <td>8</td>
248 <td>8</td>
249 <td>8</td>
250 <td>8</td>
251 <td>8</td>
252 <td>8</td>
253 <td>8</td>
254 <td>8</td>
255 <td>8</td>
256 <td>8</td>
257 <td>8</td>
258 </tr>
259 <tr>
260 <td>org.jacoco.core.test.validation.kotlin</td>
261 <td></td>
262 <td></td>
263 <td></td>
264 <td>8</td>
265 <td>8</td>
266 <td>8</td>
267 <td>8</td>
268 <td>8</td>
269 <td>8</td>
270 <td>8</td>
271 <td>8</td>
272 <td>8</td>
273 <td>8</td>
274 <td>8</td>
275 <td>8</td>
276 <td>8</td>
277 <td>8</td>
278 <td>8</td>
279 <td>8</td>
280 <td>8</td>
281 <td>8</td>
282 <td>8</td>
283 </tr>
284 <tr>
285 <td>org.jacoco.core.test.validation.scala</td>
286 <td></td>
287 <td></td>
288 <td></td>
289 <td>8</td>
290 <td>8</td>
291 <td>8</td>
292 <td>8</td>
293 <td>8</td>
294 <td>8</td>
295 <td>8</td>
296 <td>8</td>
297 <td>8</td>
298 <td>8</td>
299 <td>8</td>
300 <td>8</td>
301 <td>8</td>
302 <td>8</td>
303 <td>8</td>
304 <td>8</td>
305 <td>8</td>
306 <td>8</td>
307 <td>8</td>
308 </tr>
309 <tr>
310 <td>all other modules</td>
311 <td>5</td>
312 <td>5</td>
313 <td>5</td>
314 <td>5</td>
315 <td>6</td>
316 <td>6</td>
317 <td>6</td>
318 <td>7</td>
319 <td>7</td>
320 <td>7</td>
321 <td>7</td>
322 <td>7</td>
323 <td>7</td>
324 <td>7</td>
325 <td>7</td>
326 <td>8</td>
327 <td>8</td>
328 <td>8</td>
329 <td>8</td>
330 <td>8</td>
331 <td>8</td>
332 <td>8</td>
333 </tr>
334 </tbody>
335 </table>
336
337 <p>
338 Alternatively you can specify bytecode version for all modules using property
339 <code>bytecode.version</code>.
340 </p>
341
342 <p>
343 For example to use JDK 10 from Maven Toolchains and compile all modules
344 into bytecode version 53 (Java 9):
345 </p>
346
347 <pre>
348 ../mvnw clean verify -Djdk.version=10 -Dbytecode.version=9
349 </pre>
350
351 <p>
352 Also Eclipse Compiler for Java can be used for compilation:
353 </p>
354
355 <pre>
356 ../mvnw clean verify -Decj
357 </pre>
358
359 <p>
360 Combining these options JaCoCo is regularly tested with the following setups:
361 </p>
362
363 <ul>
364 <li><code>../mvnw clean verify -Djdk.version=5 -Dbytecode.version=5</code></li>
365 <li><code>../mvnw clean verify -Djdk.version=6 -Dbytecode.version=6</code></li>
366 <li><code>../mvnw clean verify -Djdk.version=7 -Dbytecode.version=7</code></li>
367 <li><code>../mvnw clean verify -Djdk.version=8 -Dbytecode.version=8</code></li>
368 <li><code>../mvnw clean verify -Djdk.version=9 -Dbytecode.version=9</code></li>
369 <li><code>../mvnw clean verify -Djdk.version=10 -Dbytecode.version=10</code></li>
370 <li><code>../mvnw clean verify -Djdk.version=11 -Dbytecode.version=11</code></li>
371 <li><code>../mvnw clean verify -Djdk.version=11 -Dbytecode.version=11 -Decj</code></li>
372 <li><code>../mvnw clean verify -Djdk.version=12 -Dbytecode.version=12</code></li>
373 <li><code>../mvnw clean verify -Djdk.version=13 -Dbytecode.version=13</code></li>
374 <li><code>../mvnw clean verify -Djdk.version=14 -Dbytecode.version=14</code></li>
375 <li><code>../mvnw clean verify -Djdk.version=15 -Dbytecode.version=15</code></li>
376 <li><code>../mvnw clean verify -Djdk.version=16 -Dbytecode.version=16</code></li>
377 <li><code>../mvnw clean verify -Djdk.version=17 -Dbytecode.version=17</code></li>
378 <li><code>../mvnw clean verify -Djdk.version=17 -Dbytecode.version=17 -Decj</code></li>
379 <li><code>../mvnw clean verify -Djdk.version=18 -Dbytecode.version=18</code></li>
380 <li><code>../mvnw clean verify -Djdk.version=19 -Dbytecode.version=19</code></li>
381 <li><code>../mvnw clean verify -Djdk.version=20 -Dbytecode.version=20</code></li>
382 <li><code>../mvnw clean verify -Djdk.version=21 -Dbytecode.version=21</code></li>
383 <li><code>../mvnw clean verify -Djdk.version=21 -Dbytecode.version=21 -Decj</code></li>
384 <li><code>../mvnw clean verify -Djdk.version=22 -Dbytecode.version=22</code></li>
385 <li><code>../mvnw clean verify -Djdk.version=23 -Dbytecode.version=23</code></li>
386 <li><code>../mvnw clean verify -Djdk.version=24 -Dbytecode.version=24</code></li>
387 <li><code>../mvnw clean verify -Djdk.version=25 -Dbytecode.version=25</code></li>
388 <li><code>../mvnw clean verify -Djdk.version=26 -Dbytecode.version=26</code></li>
389 </ul>
390
391
392 </div>
393 <div class="footer">
394 <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
395 <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
396 </div>
397
398 </body>
399 </html>