Update documentation for 4.1
[egit/eclipse.git] / org.eclipse.egit.doc / help / EGit / Contributor_Guide / Builds.html
blob6d07ef21562220f92f58483d1c3f0cd512d5bf0e
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="Development-IDE-Configuration.html" title="Development IDE Configuration">
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">Development IDE Configuration</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/>
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> (but currently not Maven 3.1.0)
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 7 to run the JGit Maven build (required since bundle
61 <i>org.eclipse.jgit.java7</i> needs Java 7)
62 </li>
63 <li>JGit packaging projects (Eclipse feature and update site) are built using Maven 3 and Tycho.</li>
64 </ul>
65 <h2 id="EGit_2">EGit</h2>
66 <ul>
67 <li>EGit is built using Maven 3 and Tycho.</li>
68 </ul>
69 <h2 id="Mailing_Lists">Mailing Lists</h2>
70 <p>If you're interested in following builds, please check out the following mailing lists:</p>
71 <ul>
72 <li>
73 <a href="https://dev.eclipse.org/mailman/listinfo/jgit-build" target="egit_external">Subscribe to jgit-build@eclipse.org</a>
74 </li>
75 <li>
76 <a href="https://dev.eclipse.org/mailman/listinfo/egit-build" target="egit_external">Subscribe to egit-build@eclipse.org</a>
77 </li>
78 </ul>
79 <h2 id="Maven_Build_Sequence">Maven Build Sequence</h2>
80 <ul>
81 <li>Due to a
82 <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.
83 </li>
84 <li>The 3 builds must share the same local Maven repository otherwise dependencies between these builds cannot be resolved.</li>
85 <li>To run the build behind a firewall follow
86 <a href="http://maven.apache.org/guides/mini/guide-proxies.html" target="egit_external">http://maven.apache.org/guides/mini/guide-proxies.html</a>
87 </li>
88 </ul>
89 <p>Complete build sequence for a clean build (assuming $M2_HOME/bin is on the path and local Maven repository at ~/.m2/repository):</p>
90 <pre style="width: 55em;">[~/src/jgit] $ mvn clean install
91 [INFO] Scanning for projects...
92 ...
94 [~/src/jgit] $ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
95 [INFO] Scanning for projects...
96 ...
98 [~/src/jgit] $ cd ../egit
100 [~/src/egit] $ mvn clean install
101 [INFO] Scanning for projects...
103 </pre>
104 <p>The EGit build uses the JGit p2 repository to resolve jgit dependencies. For local builds the build assumes
105 that egit and jgit source trees are located under a common parent folder. If this is not the case the path
106 to the jgit p2 repository has to be injected via system property:</p>
107 <pre><a href="~/src/egit">~/src/egit</a> $ mvn clean install -Djgit-site=file:/path/to/org.eclipse.jgit.updatesite/target/site
108 </pre>
109 <p>The hudson build on build.eclipse.org uses (for SNAPSHOT builds):</p>
110 <pre><a href="~/src/egit">~/src/egit</a> $ 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>
111 org/eclipse/jgit/org.eclipse.jgit.repository/${JGIT_VERSION}/org.eclipse.jgit.repository-${JGIT_VERSION}.zip-unzip/
112 </pre>
113 <p>If you wan to build EGit for the specific Juno platform, consider using the <code>platform-juno</code> maven profile:</p>
114 <pre><a href="~/src/egit">~/src/egit</a> $ mvn -P platform-juno clean install
115 </pre>
116 <p>For EGit version 3.0, <code>platform-juno</code> (Eclipse 4.2) and <code>platform-kepler</code> (Eclipse 4.3) are available. In addition <code>platform-kepler-staging</code> refers to the Kepler staging repository.</p>
117 <p>Upon a successful build, a p2 update site should be generated inside
118 <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.3.
119 </p>
120 <h2 id="FindBugs_and_PMD">FindBugs and PMD</h2>
121 <p>As part of the build, JGit and EGit run FindBugs and PMD to find issues.</p>
122 <ul>
123 <li>
124 <a href="https://hudson.eclipse.org/egit/job/jgit/findbugs" target="egit_external">JGit FindBugs Results</a>
125 </li>
126 <li>
127 <a href="https://hudson.eclipse.org/egit/job/jgit/dry" target="egit_external">JGit DRY (PMD) Results</a>
128 </li>
129 <li>
130 <a href="https://hudson.eclipse.org/egit/job/egit/findbugs" target="egit_external">EGit FindBugs Results</a>
131 </li>
132 <li>
133 <a href="https://hudson.eclipse.org/egit/job/egit/dry" target="egit_external">EGit DRY (PMD) Results</a>
134 </li>
135 </ul>
136 <h2 id="Checking_for_JGit_API_Changes_using_API_Baseline">Checking for JGit API Changes using API Baseline</h2>
137 <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>
138 <ul>
139 <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
140 <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
141 </li>
142 <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>
143 <li>the API tools will then raise warning/errors for all detected problems and provide quick fixes helping to resolve these problems</li>
144 <li>see the
145 <a href="http://wiki.eclipse.org/PDE/API_Tools/User_Guide" target="egit_external">PDE API Tools User Guide</a> for more details.
146 </li>
147 </ul>
148 <h2 id="Automated_Signing_and_Publishing">Automated Signing and Publishing</h2>
149 <p>EGit and JGit builds running on the
150 <a href="https://hudson.eclipse.org/egit/" target="egit_external">JGit/EGit Hudson</a> are automatically signed
151 (using the
152 <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
153 </p>
154 <pre>
155 master branch: /home/data/httpd/download.eclipse.org/egit/updates-nightly
156 latest stable branch: /home/data/httpd/download.eclipse.org/egit/updates-stable-nightly
157 </pre>
158 <ul>
159 <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
160 <a href="https://hudson.eclipse.org/egit/" target="egit_external">https://hudson.eclipse.org/egit/</a>
161 </li>
162 <li>To enable publishing to
163 <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.
164 </li>
165 </ul>
166 <h4 id="Signing_.28old_method.2C_replaced_by_automated_procedure.29">Signing (old method, replaced by automated procedure)</h4>
167 <p>To sign the EGit build, you need to have ssh access to build.eclipse.org and the ability to run
168 <b>/usr/bin/sign</b>
169 </p>
170 <p>At the moment, Chris Aniszczyk (caniszczyk) and Matthias Sohn (msohn) have signing privileges.</p>
171 <p>The first step is to ensure you're in a place you can sign on build.eclipse.org</p>
172 <pre>cd /home/data/httpd/download-staging.priv/commonBuild
173 </pre>
174 <p>Next you run the signing command (Usage: /usr/bin/sign &lt;file&gt; &lt;mail|nomail&gt;
175 <a href="outputDir">outputDir</a>) on a zip of the EGit repo...
176 </p>
177 <pre>sign egit-p2-repo.zip my@email.com /home/data/users/caniszczyk/egit-0.8
178 </pre>
179 <p>After that, you can publish the zip that is generated with the signing information.</p>
180 <h2 id="Contribution_to_Release_Train">Contribution to Release Train</h2>
181 <p>The release train contribution for JGit and EGit is maintained in the git repository </p>
182 <pre>ssh://git.eclipse.org/gitroot/simrel/org.eclipse.simrel.build.git
183 </pre>
184 <p>in the file</p>
185 <pre>egit.b3aggrcon
186 </pre>
187 <p>The release train build is coordinated on the
188 <a href="https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev" target="egit_external">cross-project-issues-dev mailing list</a>
189 </p>
191 <br/>
192 </p><hr/>
193 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
194 <tr>
195 <td style="width: 20%" align="left">
196 <a href="Development-IDE-Configuration.html" title="Development IDE Configuration">
197 <img alt="Previous" border="0" src="../../images/prev.gif"/>
198 </a>
199 </td>
200 <td style="width: 60%" align="center">
201 <a href="Contributor-Guide.html" title="EGit Contributor Guide">
202 <img alt="EGit Contributor Guide" border="0" src="../../images/home.gif"/>
203 </a>
204 </td>
205 <td style="width: 20%" align="right">
206 <a href="Documentation.html" title="Documentation">
207 <img alt="Next" border="0" src="../../images/next.gif"/>
208 </a>
209 </td>
210 </tr>
211 <tr>
212 <td style="width: 20%" align="left" valign="top">Development IDE Configuration</td>
213 <td style="width: 60%" align="center"></td>
214 <td style="width: 20%" align="right" valign="top">Documentation</td>
215 </tr>
216 </table>
217 </body>
218 </html>