Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ISO-8859-1" ?>
|
| 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=ISO-8859-1" />
|
| 6 | <link rel="stylesheet" href=".resources/doc.css" charset="ISO-8859-1" type="text/css" />
|
Marc R. Hoffmann | 0fd9c83 | 2011-03-16 20:42:40 +0000 | [diff] [blame] | 7 | <link rel="stylesheet" href="../coverage/.resources/prettify.css" charset="ISO-8859-1" type="text/css" />
|
Marc R. Hoffmann | d7d2f75 | 2010-05-06 21:12:31 +0000 | [diff] [blame] | 8 | <link rel="shortcut icon" href=".resources/report.gif" type="image/gif" />
|
Marc R. Hoffmann | 0fd9c83 | 2011-03-16 20:42:40 +0000 | [diff] [blame] | 9 | <script type="text/javascript" src="../coverage/.resources/prettify.js"></script>
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 10 | <title>JaCoCo - Build</title>
|
| 11 | </head>
|
Marc R. Hoffmann | 0fd9c83 | 2011-03-16 20:42:40 +0000 | [diff] [blame] | 12 | <body onload="prettyPrint()">
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 13 |
|
| 14 | <div class="breadcrumb">
|
Marc R. Hoffmann | d7d2f75 | 2010-05-06 21:12:31 +0000 | [diff] [blame] | 15 | <a href="../index.html" class="el_report">JaCoCo</a> >
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 16 | <a href="index.html" class="el_group">Documentation</a> >
|
| 17 | <span class="el_source">Build</span>
|
| 18 | </div>
|
Marc R. Hoffmann | 17be269 | 2010-02-02 05:44:47 +0000 | [diff] [blame] | 19 | <div id="content">
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 20 |
|
| 21 | <h1>Build</h1>
|
| 22 |
|
| 23 | <p>
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 24 | The JaCoCo build is fully based on <a href="http://maven.apache.org/">Maven</a>
|
| 25 | and its extension <a href="http://www.eclipse.org/tycho/">Tycho</a> to build
|
| 26 | OSGi bundles based on the declations in their <code>MANIFEST.MF</code> file
|
| 27 | ("manfest-first" approach). The build can be locally executed on every machine
|
| 28 | with a proper <a href="environment.html">environment setup</a>. In particular
|
| 29 | you need a <a href="http://maven.apache.org/">Maven 3</a> installation.
|
| 30 | Developers are encouraged to run the build before every commit to ensure
|
| 31 | consistency of the source tree.
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 32 | </p>
|
| 33 |
|
| 34 |
|
| 35 | <h2>Running the Build</h2>
|
| 36 |
|
| 37 | <p>
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 38 | The build can be started by executing the following command with
|
| 39 | <code>./org.jacoco.build/</code> as the working directory:
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 40 | </p>
|
| 41 |
|
| 42 | <pre>
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 43 | mvn clean install
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 44 | </pre>
|
| 45 |
|
| 46 | <p>
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 47 | Total build time is typically around 3 minutes, however first build might take
|
| 48 | more time, because Maven should download plugins and dependencies. The
|
| 49 | download ZIP will be created at the following location:
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 50 | </p>
|
| 51 |
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 52 | <pre>
|
| 53 | ./org.jacoco.doc/target/jacoco-<i>x.y.z.qualifier</i>.zip
|
| 54 | </pre>
|
| 55 |
|
| 56 |
|
| 57 | <h2>Testing with different JDKs</h2>
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 58 |
|
| 59 | <p>
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 60 | Target Java version for JaCoCo builds is 1.5, however for verification
|
| 61 | purposes you can execute tests using other versions. In order to do so, first
|
| 62 | you should create file <code>toolchains.xml</code> in <code>~/.m2/</code>
|
| 63 | directory. Here is an example of such file. For more information see
|
| 64 | <a href="http://maven.apache.org/guides/mini/guide-using-toolchains.html">Maven
|
| 65 | Guide to Using Toolchains</a>.
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 66 | </p>
|
| 67 |
|
Marc R. Hoffmann | abfa65d | 2012-01-12 19:52:58 +0000 | [diff] [blame] | 68 | <pre class="source lang-xml linenums">
|
| 69 | <?xml version="1.0" encoding="UTF8"?>
|
| 70 | <toolchains>
|
| 71 | <toolchain>
|
| 72 | <type>jdk</type>
|
| 73 | <provides>
|
| 74 | <id>java15</id>
|
| 75 | <version>1.5</version>
|
| 76 | <vendor>sun</vendor>
|
| 77 | </provides>
|
| 78 | <configuration>
|
| 79 | <jdkHome>/usr/lib/jvm/sun-jdk-1.5</jdkHome>
|
| 80 | </configuration>
|
| 81 | </toolchain>
|
| 82 | <toolchain>
|
| 83 | <type>jdk</type>
|
| 84 | <provides>
|
| 85 | <id>java16</id>
|
| 86 | <version>1.6</version>
|
| 87 | <vendor>sun</vendor>
|
| 88 | </provides>
|
| 89 | <configuration>
|
| 90 | <jdkHome>/usr/lib/jvm/sun-jdk-1.6</jdkHome>
|
| 91 | </configuration>
|
| 92 | </toolchain>
|
| 93 | <toolchain>
|
| 94 | <type>jdk</type>
|
| 95 | <provides>
|
| 96 | <id>java17</id>
|
| 97 | <version>1.7</version>
|
| 98 | <vendor>sun</vendor>
|
| 99 | </provides>
|
| 100 | <configuration>
|
| 101 | <jdkHome>/usr/lib/jvm/sun-jdk-1.7</jdkHome>
|
| 102 | </configuration>
|
| 103 | </toolchain>
|
| 104 | </toolchains>
|
| 105 | </pre>
|
| 106 |
|
| 107 | <p>
|
| 108 | Now you should be able to execute maven build with specified version of JDK:
|
| 109 | </p>
|
| 110 |
|
| 111 | <pre>
|
| 112 | mvn clean install -Djdk.version=<i>version</i>
|
| 113 | </pre>
|
| 114 |
|
| 115 | <p>
|
| 116 | Location of <code>toolchains.xml</code> can be set via an option:
|
| 117 | </p>
|
| 118 |
|
| 119 | <pre>
|
| 120 | mvn --toolchains <i>path</i> clean install -Djdk.version=<i>version</i>
|
| 121 | </pre>
|
| 122 |
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 123 |
|
Marc R. Hoffmann | 17be269 | 2010-02-02 05:44:47 +0000 | [diff] [blame] | 124 | </div>
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 125 | <div class="footer">
|
Marc R. Hoffmann | b623ffb | 2010-05-06 19:48:08 +0000 | [diff] [blame] | 126 | <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
|
Marc R. Hoffmann | df6ff96 | 2010-04-09 15:31:22 +0000 | [diff] [blame] | 127 | <a href="license.html">Copyright</a> © @copyright.years@ Mountainminds GmbH & Co. KG and Contributors
|
Marc R. Hoffmann | cd59d2a | 2009-10-15 10:53:12 +0000 | [diff] [blame] | 128 | </div>
|
| 129 |
|
| 130 | </body>
|
| 131 | </html> |