Update documentation for 4.6
[egit/eclipse.git] / org.eclipse.egit.doc / help / EGit / Contributor_Guide / Builds.html
blob3712a5175c4c84a21777ba01e2e92495bdfda2a0
1 <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5 <title>EGit Contributor Guide - Builds</title>
6 <link type="text/css" rel="stylesheet" href="../../book.css"/>
7 </head>
8 <body>
9 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
10 <tr>
11 <th style="width: 100%" align="center" colspan="3">Builds</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="Running-EGit-from-Eclipse.html" title="Running EGit from Eclipse">
16 <img alt="Previous" border="0" src="../../images/prev.gif"/>
17 </a>
18 </td>
19 <td style="width: 60%" align="center"></td>
20 <td style="width: 20%" align="right">
21 <a href="Documentation.html" title="Documentation">
22 <img alt="Next" border="0" src="../../images/next.gif"/>
23 </a>
24 </td>
25 </tr>
26 <tr>
27 <td style="width: 20%" align="left" valign="top">Running EGit from Eclipse</td>
28 <td style="width: 60%" align="center"></td>
29 <td style="width: 20%" align="right" valign="top">Documentation</td>
30 </tr>
31 </table><hr class="navigation-separator"/>
32 <h1 id="Builds">Builds</h1>
33 <p>The central EGit and JGit builds run on the
34 <a href="https://hudson.eclipse.org/egit/" target="egit_external">JGit/EGit Hudson instance</a>
35 </p>
36 <p>Prerequisites for the Maven build are</p>
37 <ul>
38 <li>
39 <a href="http://maven.apache.org/download.html" target="egit_external">at least Maven 3.0.0</a>
40 </li>
41 <li>see
42 <a href="http://maven.apache.org/settings.html" target="egit_external">settings.xml reference</a> on how to do basic Maven configuration
43 </li>
44 <li>if you want to learn how Maven works start reading
45 <a href="http://maven.apache.org/guides/getting-started/index.html" target="egit_external">the Maven Getting Started Guide</a>
46 </li>
47 </ul>
48 <p>Hudson</p>
49 <ul>
50 <li>
51 <a href="https://hudson.eclipse.org/egit/master" target="egit_external">development build jobs</a>
52 </li>
53 <li>
54 <a href="https://hudson.eclipse.org/egit/stable" target="egit_external">maintenance and release build jobs</a>
55 </li>
56 </ul>
57 <h2 id="JGit_2">JGit</h2>
58 <ul>
59 <li>JGit can be built using Maven 2 or 3.</li>
60 <li>use Java 8 to run the JGit Maven build</li>
61 <li>JGit packaging projects (Eclipse feature and update site) are built using Maven 3 and Tycho.</li>
62 </ul>
63 <h2 id="EGit_2">EGit</h2>
64 <ul>
65 <li>EGit is built using Maven 3 and Tycho.</li>
66 </ul>
67 <h2 id="Mailing_Lists">Mailing Lists</h2>
68 <p>If you're interested in following builds, please check out the following mailing lists:</p>
69 <ul>
70 <li>
71 <a href="https://dev.eclipse.org/mailman/listinfo/jgit-build" target="egit_external">Subscribe to jgit-build@eclipse.org</a>
72 </li>
73 <li>
74 <a href="https://dev.eclipse.org/mailman/listinfo/egit-build" target="egit_external">Subscribe to egit-build@eclipse.org</a>
75 </li>
76 </ul>
77 <h2 id="Maven_Build_Sequence">Maven Build Sequence</h2>
78 <ul>
79 <li>Due to a
80 <a href="http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts" target="egit_external">current limitation of Tycho</a> it is not possible to mix pom-first and manifest-first builds in the same reactor build hence the pom-first JGit build has to run separately before the build for the manifest-first JGit packaging project.
81 </li>
82 <li>The 3 builds must share the same local Maven repository otherwise dependencies between these builds cannot be resolved.</li>
83 <li>To run the build behind a firewall follow
84 <a href="http://maven.apache.org/guides/mini/guide-proxies.html" target="egit_external">http://maven.apache.org/guides/mini/guide-proxies.html</a>
85 </li>
86 </ul>
87 <p>Complete build sequence for a clean build (assuming $M2_HOME/bin is on the path and local Maven repository at ~/.m2/repository):</p>
88 <pre style="width: 55em;">[~/src/jgit] $ mvn clean install
89 [INFO] Scanning for projects...
90 ...
92 [~/src/jgit] $ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
93 [INFO] Scanning for projects...
94 ...
96 [~/src/jgit] $ cd ../egit
98 [~/src/egit] $ mvn clean install
99 [INFO] Scanning for projects...
101 </pre>
102 <p>The EGit build uses the JGit p2 repository to resolve jgit dependencies. For local builds the build assumes
103 that egit and jgit source trees are located under a common parent folder. If this is not the case the path
104 to the jgit p2 repository has to be injected via system property:</p>
105 <pre>[~/src/egit] $ mvn clean install -Djgit-site=file:/path/to/org.eclipse.jgit.updatesite/target/site
106 </pre>
107 <p>The hudson build on build.eclipse.org uses (for SNAPSHOT builds):</p>
108 <pre>[~/src/egit] $ mvn clean install -Djgit-site=<a href="https://repo.eclipse.org/content/unzip/snapshots.unzip/" target="egit_external">https://repo.eclipse.org/content/unzip/snapshots.unzip/</a>
109 org/eclipse/jgit/org.eclipse.jgit.repository/${JGIT_VERSION}/org.eclipse.jgit.repository-${JGIT_VERSION}.zip-unzip/
110 </pre>
111 <p>If you wan to build EGit for the specific Neon (4.6) platform, consider using the <code>egit-4.6</code> target platform:</p>
112 <pre>[~/src/egit] $ mvn -Dtarget-platform=egit-4.6 clean install
113 </pre>
114 <p>For EGit version 4.6, <code>egit-4.5</code> (Mars, Eclipse 4.5), <code>egit-4.6</code> (Neon, Eclipse 4.6), and <code>egit-4.7</code> (Oxygen, Eclipse 4.7) are available. In addition <code>egit-4.7-staging</code> refers to the Oxygen staging repository.</p>
115 <p>Upon a successful build, a p2 update site should be generated inside
116 <i>egit/org.eclipse.egit.repository/target/repository</i>. If not, make sure the target platform has been downloaded from within Eclipse (Windows&gt;Preferences&gt;Plug-in Development&gt;Target Platform). The default target platform defined in the maven build is currently Eclipse 4.6. If you skip setting the system property <code>target-platform</code> the target platform for Eclipse 4.6 will be used.
117 </p>
118 <h2 id="JGit_Buck_Build">JGit Buck Build</h2>
119 <p>The JGit libraries used by Gerrit Code Review can also be built using
120 <a href="https://buckbuild.com/" target="egit_external">buck</a>:
121 </p>
122 <ul>
123 <li>
124 <a href="https://buckbuild.com/setup/getting_started.html" target="egit_external">install buck</a>
125 </li>
126 <li>to build all libraries run</li>
127 </ul>
128 <pre>[jgit] $ buck build all
129 </pre>
130 <ul>
131 <li>to run the unit tests run</li>
132 </ul>
133 <pre>[jgit] $ buck test
134 </pre>
135 <h2 id="JGit_Bazel_Build">JGit Bazel Build</h2>
136 <p>Since Gerrit is migrating its build from buck to
137 <a href="https://www.bazel.io/" target="egit_external">Bazel</a> a
138 <a href="https://git.eclipse.org/r/#/c/84527/" target="egit_external">Bazel build for JGit</a> is under construction.
139 </p>
140 <p>You can try the Bazel build:</p>
141 <ul>
142 <li>
143 <a href="https://www.bazel.io/versions/master/docs/install.html" target="egit_external">install Bazel</a>
144 </li>
145 <li>fetch the change implementing the Bazel build</li>
146 </ul>
147 <pre>[jgit] $ git fetch <a href="https://git.eclipse.org/r/a/jgit/jgit" target="egit_external">https://git.eclipse.org/r/a/jgit/jgit</a> refs/changes/27/84527/8 &amp;&amp; git checkout FETCH_HEAD
148 </pre>
149 <ul>
150 <li>to build all libraries run</li>
151 </ul>
152 <pre>[jgit] $ bazel build :all
153 </pre>
154 <h2 id="FindBugs_and_PMD">FindBugs and PMD</h2>
155 <p>As part of the build, JGit and EGit run FindBugs and PMD to find issues.</p>
156 <ul>
157 <li>
158 <a href="https://hudson.eclipse.org/egit/job/jgit/findbugs" target="egit_external">JGit FindBugs Results</a>
159 </li>
160 <li>
161 <a href="https://hudson.eclipse.org/egit/job/jgit/dry" target="egit_external">JGit DRY (PMD) Results</a>
162 </li>
163 <li>
164 <a href="https://hudson.eclipse.org/egit/job/egit/findbugs" target="egit_external">EGit FindBugs Results</a>
165 </li>
166 <li>
167 <a href="https://hudson.eclipse.org/egit/job/egit/dry" target="egit_external">EGit DRY (PMD) Results</a>
168 </li>
169 </ul>
170 <h2 id="Checking_for_JGit_API_Changes_using_API_Baseline">Checking for JGit API Changes using API Baseline</h2>
171 <p>The JGit projects have API tooling enabled. In order to use PDE API tools to get assistance with maintaining API changes and additions you need to set an API baseline:</p>
172 <ul>
173 <li>download the p2 repository for the latest EGit release (which includes the JGit artifacts) to a local folder, e.g. <code>~/egit-releases/updates-4.0</code>, find the p2 repository URLs
174 <a href="http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F" target="egit_external">here</a> and download the p2 repository of the latest minor release (service releases don't change API) using the corresponding link in the last column of that table
175 </li>
176 <li>in Eclipse click "Preferences &gt; Plug-In Development &gt; API Baselines", click "Add Baseline..." and define a new baseline (e.g. egit-4.0) and point it to the local copy of the corresponding EGit p2 repository.</li>
177 <li>the API tools will then raise warning/errors for all detected problems and provide quick fixes helping to resolve these problems</li>
178 <li>see the
179 <a href="http://wiki.eclipse.org/PDE/API_Tools/User_Guide" target="egit_external">PDE API Tools User Guide</a> for more details.
180 </li>
181 </ul>
182 <h2 id="Automated_Signing_and_Publishing">Automated Signing and Publishing</h2>
183 <p>EGit and JGit builds running on the
184 <a href="https://hudson.eclipse.org/egit/" target="egit_external">JGit/EGit Hudson</a> are automatically signed
185 (using the
186 <a href="http://wiki.eclipse.org/Common_Build_Infrastructure#Signing_tool" title="Common_Build_Infrastructure#Signing_tool" target="egit_external">CBI eclipse-jarsigner-plugin</a>) and published to the folder
187 </p>
188 <pre>
189 master branch: /home/data/httpd/download.eclipse.org/egit/updates-nightly
190 latest stable branch: /home/data/httpd/download.eclipse.org/egit/updates-stable-nightly
191 </pre>
192 <ul>
193 <li>To enable signing the maven profile <code>eclipse-sign</code> must be enabled via the option <code>-P eclipse-sign</code> in the respective build jobs running at
194 <a href="https://hudson.eclipse.org/egit/" target="egit_external">https://hudson.eclipse.org/egit/</a>
195 </li>
196 <li>To enable publishing to
197 <i>download.eclipse.org</i> the maven profile <code>publish</code> must be enabled via the option <code>-P publish</code> in the egit build job.
198 </li>
199 </ul>
200 <h4 id="Signing_.28old_method.2C_replaced_by_automated_procedure.29">Signing (old method, replaced by automated procedure)</h4>
201 <p>To sign the EGit build, you need to have ssh access to build.eclipse.org and the ability to run
202 <b>/usr/bin/sign</b>
203 </p>
204 <p>At the moment, Chris Aniszczyk (caniszczyk) and Matthias Sohn (msohn) have signing privileges.</p>
205 <p>The first step is to ensure you're in a place you can sign on build.eclipse.org</p>
206 <pre>cd /home/data/httpd/download-staging.priv/commonBuild
207 </pre>
208 <p>Next you run the signing command (Usage: /usr/bin/sign &lt;file&gt; &lt;mail|nomail&gt; [outputDir]) on a zip of the EGit repo...</p>
209 <pre>sign egit-p2-repo.zip my@email.com /home/data/users/caniszczyk/egit-0.8
210 </pre>
211 <p>After that, you can publish the zip that is generated with the signing information.</p>
212 <h2 id="Contribution_to_Release_Train">Contribution to Release Train</h2>
213 <p>The release train contribution for JGit and EGit is maintained in the git repository </p>
214 <pre>ssh://git.eclipse.org/gitroot/simrel/org.eclipse.simrel.build.git
215 </pre>
216 <p>in the file</p>
217 <pre>egit.b3aggrcon
218 </pre>
219 <p>The release train build is coordinated on the
220 <a href="https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev" target="egit_external">cross-project-issues-dev mailing list</a>
221 </p>
223 <br/>
224 </p><hr class="navigation-separator"/>
225 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
226 <tr>
227 <td style="width: 20%" align="left">
228 <a href="Running-EGit-from-Eclipse.html" title="Running EGit from Eclipse">
229 <img alt="Previous" border="0" src="../../images/prev.gif"/>
230 </a>
231 </td>
232 <td style="width: 60%" align="center">
233 <a href="Contributor-Guide.html" title="EGit Contributor Guide">
234 <img alt="EGit Contributor Guide" border="0" src="../../images/home.gif"/>
235 </a>
236 </td>
237 <td style="width: 20%" align="right">
238 <a href="Documentation.html" title="Documentation">
239 <img alt="Next" border="0" src="../../images/next.gif"/>
240 </a>
241 </td>
242 </tr>
243 <tr>
244 <td style="width: 20%" align="left" valign="top">Running EGit from Eclipse</td>
245 <td style="width: 60%" align="center"></td>
246 <td style="width: 20%" align="right" valign="top">Documentation</td>
247 </tr>
248 </table>
249 </body>
250 </html>