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">
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"/>
9 <table class=
"navigation" style=
"width: 100%;" border=
"0" summary=
"navigation">
11 <th style=
"width: 100%" align=
"center" colspan=
"3">Builds
</th>
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"/>
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"/>
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>
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>
36 <p>Prerequisites for the Maven build are
</p>
39 <a href=
"http://maven.apache.org/download.html" target=
"egit_external">at least Maven
3.0.0</a>
42 <a href=
"http://maven.apache.org/settings.html" target=
"egit_external">settings.xml reference
</a> on how to do basic Maven configuration
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>
51 <a href=
"https://hudson.eclipse.org/egit/master" target=
"egit_external">development build jobs
</a>
54 <a href=
"https://hudson.eclipse.org/egit/stable" target=
"egit_external">maintenance and release build jobs
</a>
57 <h2 id=
"JGit_2">JGit
</h2>
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>
63 <h2 id=
"EGit_2">EGit
</h2>
65 <li>EGit is built using Maven
3 and Tycho.
</li>
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>
71 <a href=
"https://dev.eclipse.org/mailman/listinfo/jgit-build" target=
"egit_external">Subscribe to jgit-build@eclipse.org
</a>
74 <a href=
"https://dev.eclipse.org/mailman/listinfo/egit-build" target=
"egit_external">Subscribe to egit-build@eclipse.org
</a>
77 <h2 id=
"Maven_Build_Sequence">Maven Build Sequence
</h2>
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.
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>
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...
92 [~/src/jgit] $ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
93 [INFO] Scanning for projects...
96 [~/src/jgit] $ cd ../egit
98 [~/src/egit] $ mvn clean install
99 [INFO] Scanning for projects...
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
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/
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
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
>Preferences
>Plug-in Development
>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.
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>:
124 <a href=
"https://buckbuild.com/setup/getting_started.html" target=
"egit_external">install buck
</a>
126 <li>to build all libraries run
</li>
128 <pre>[jgit] $ buck build all
131 <li>to run the unit tests run
</li>
133 <pre>[jgit] $ buck test
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.
140 <p>You can try the Bazel build:
</p>
143 <a href=
"https://www.bazel.io/versions/master/docs/install.html" target=
"egit_external">install Bazel
</a>
145 <li>fetch the change implementing the Bazel build
</li>
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 && git checkout FETCH_HEAD
150 <li>to build all libraries run
</li>
152 <pre>[jgit] $ bazel build :all
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>
158 <a href=
"https://hudson.eclipse.org/egit/job/jgit/findbugs" target=
"egit_external">JGit FindBugs Results
</a>
161 <a href=
"https://hudson.eclipse.org/egit/job/jgit/dry" target=
"egit_external">JGit DRY (PMD) Results
</a>
164 <a href=
"https://hudson.eclipse.org/egit/job/egit/findbugs" target=
"egit_external">EGit FindBugs Results
</a>
167 <a href=
"https://hudson.eclipse.org/egit/job/egit/dry" target=
"egit_external">EGit DRY (PMD) Results
</a>
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>
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
176 <li>in Eclipse click
"Preferences > Plug-In Development > 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>
179 <a href=
"http://wiki.eclipse.org/PDE/API_Tools/User_Guide" target=
"egit_external">PDE API Tools User Guide
</a> for more details.
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
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
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
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>
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.
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
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
208 <p>Next you run the signing command (Usage: /usr/bin/sign
<file
> <mail|nomail
> [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
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
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>
224 </p><hr class=
"navigation-separator"/>
225 <table class=
"navigation" style=
"width: 100%;" border=
"0" summary=
"navigation">
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"/>
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"/>
237 <td style=
"width: 20%" align=
"right">
238 <a href=
"Documentation.html" title=
"Documentation">
239 <img alt=
"Next" border=
"0" src=
"../../images/next.gif"/>
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>