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> > 16 <a href="index.html" class="el_group">Documentation</a> > 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 at 27 least <a href="http://maven.apache.org/">Maven 3.3.9</a> and JDK 8 28 installations. Developers are encouraged to run the build before every commit 29 to ensure consistency of the source tree. 30</p> 31 32 33<h2>Running the Build</h2> 34 35<p> 36 The build can be started by executing the following command with 37 <code>./org.jacoco.build/</code> as the working directory: 38</p> 39 40<pre> 41 mvn 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 mvn 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 </tr> 97 </thead> 98 <tbody> 99 <tr> 100 <td>org.jacoco.core.test.validation.java14</td> 101 <td></td> 102 <td></td> 103 <td></td> 104 <td></td> 105 <td></td> 106 <td></td> 107 <td></td> 108 <td></td> 109 <td></td> 110 <td>14</td> 111 <td>14</td> 112 <td>14</td> 113 </tr> 114 <tr> 115 <td>org.jacoco.core.test.validation.java8</td> 116 <td></td> 117 <td></td> 118 <td></td> 119 <td>8</td> 120 <td>8</td> 121 <td>8</td> 122 <td>8</td> 123 <td>8</td> 124 <td>8</td> 125 <td>8</td> 126 <td>8</td> 127 <td>8</td> 128 </tr> 129 <tr> 130 <td>org.jacoco.core.test.validation.java7</td> 131 <td></td> 132 <td></td> 133 <td>7</td> 134 <td>7</td> 135 <td>7</td> 136 <td>7</td> 137 <td>7</td> 138 <td>7</td> 139 <td>7</td> 140 <td>7</td> 141 <td>7</td> 142 <td>7</td> 143 </tr> 144 <tr> 145 <td>org.jacoco.core.test.validation.groovy</td> 146 <td></td> 147 <td></td> 148 <td></td> 149 <td>8</td> 150 <td>8</td> 151 <td>8</td> 152 <td>8</td> 153 <td>8</td> 154 <td>8</td> 155 <td>8</td> 156 <td>8</td> 157 <td>8</td> 158 </tr> 159 <tr> 160 <td>org.jacoco.core.test.validation.kotlin</td> 161 <td></td> 162 <td>6</td> 163 <td>6</td> 164 <td>6</td> 165 <td>6</td> 166 <td>6</td> 167 <td>6</td> 168 <td>6</td> 169 <td>6</td> 170 <td>6</td> 171 <td>6</td> 172 <td>6</td> 173 </tr> 174 <tr> 175 <td>all other modules</td> 176 <td>5</td> 177 <td>5</td> 178 <td>5</td> 179 <td>5</td> 180 <td>6</td> 181 <td>6</td> 182 <td>6</td> 183 <td>7</td> 184 <td>7</td> 185 <td>7</td> 186 <td>7</td> 187 <td>7</td> 188 </tr> 189 </tbody> 190</table> 191 192<p> 193 Alternatively you can specify bytecode version for all modules using property 194 <code>bytecode.version</code>. 195</p> 196 197<p> 198 For example to use JDK 10 from Maven Toolchains and compile all modules 199 into bytecode version 53 (Java 9): 200</p> 201 202<pre> 203 mvn clean verify -Djdk.version=10 -Dbytecode.version=9 204</pre> 205 206<p> 207 Also Eclipse Compiler for Java can be used for compilation: 208</p> 209 210<pre> 211 mvn clean verify -Decj 212</pre> 213 214<p> 215 Combining these options JaCoCo is regularly tested with the following setups: 216</p> 217 218<ul> 219 <li><code>mvn clean verify -Djdk.version=5 -Dbytecode.version=5</code></li> 220 <li><code>mvn clean verify -Djdk.version=6 -Dbytecode.version=6</code></li> 221 <li><code>mvn clean verify -Djdk.version=7 -Dbytecode.version=7</code></li> 222 <li><code>mvn clean verify -Djdk.version=8 -Dbytecode.version=8</code></li> 223 <li><code>mvn clean verify -Djdk.version=8 -Dbytecode.version=8 -Decj</code></li> 224 <li><code>mvn clean verify -Djdk.version=9 -Dbytecode.version=9</code></li> 225 <li><code>mvn clean verify -Djdk.version=10 -Dbytecode.version=10</code></li> 226 <li><code>mvn clean verify -Djdk.version=11 -Dbytecode.version=11</code></li> 227 <li><code>mvn clean verify -Djdk.version=12 -Dbytecode.version=12</code></li> 228 <li><code>mvn clean verify -Djdk.version=13 -Dbytecode.version=13</code></li> 229 <li><code>mvn clean verify -Djdk.version=14 -Dbytecode.version=14</code></li> 230 <li><code>mvn clean verify -Djdk.version=15 -Dbytecode.version=15</code></li> 231 <li><code>mvn clean verify -Djdk.version=16 -Dbytecode.version=16</code></li> 232</ul> 233 234 235</div> 236<div class="footer"> 237 <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span> 238 <a href="license.html">Copyright</a> © ${copyright.years} Mountainminds GmbH & Co. KG and Contributors 239</div> 240 241</body> 242</html> 243