Difference between revisions of "MemoryAnalyzer/Building MAT With Tycho"
(→Prerequisites) |
m (→Execute the build) |
||
Line 35: | Line 35: | ||
=== Execute the build === | === Execute the build === | ||
* Open a console and go into the ''<mat_src>/parent'' folder (it contains the parent pom.xml) | * Open a console and go into the ''<mat_src>/parent'' folder (it contains the parent pom.xml) | ||
− | * To build MAT execute | + | * To build MAT with the default profile (build-snapshot) simply execute |
<pre>mvn clean install</pre> | <pre>mvn clean install</pre> | ||
− | * | + | * This will cause a fresh build of all bundles, execute tests, build eclipse features, an update site (p2 repository) and standalone products |
+ | * If you want to additionally perform the FindBugs checks execute | ||
<pre>mvn clean install findbugs:findbugs</pre> | <pre>mvn clean install findbugs:findbugs</pre> | ||
Revision as of 08:40, 20 December 2016
Contents
Introduction
This page describes how Memory Analyzer can be built using Maven/Tycho. The build will
- build all MAT bundles
- execute all tests
- (optional) run FindBugs static checks
- build eclipse features containing the MAT plugins and produce an update site (p2 repository) with them
- produce standalone (Eclipse RCP based) products for different OS platforms
- sign and upload the produced artifacts (when executed on the Eclipse Hudson server)
Prerequisites
Clone the Source Code from Git
MAT sources are in a Git repository, therefore you need a git client. Have a look at MemoryAnalyzer/Contributor_Reference#Get the source
Install and Configure Maven
The Memory Analyzer build requires a Maven 3.0.* installation. It is already present on the Hudson server at Eclipse. For local build one can download it from here.
If you need to set a proxy for Maven, a snippet like this can be added to the Maven settings file:
<proxies> <proxy> <active>true</active> <protocol>http</protocol> <port>8080</port> <host>myproxy_host</host> <nonProxyHosts>non_proxy_hosts</nonProxyHosts> </proxy> </proxies>
More information on Maven settings: http://maven.apache.org/ref/3.0.3/maven-settings/settings.html
Building MAT from Sources
Execute the build
- Open a console and go into the <mat_src>/parent folder (it contains the parent pom.xml)
- To build MAT with the default profile (build-snapshot) simply execute
mvn clean install
- This will cause a fresh build of all bundles, execute tests, build eclipse features, an update site (p2 repository) and standalone products
- If you want to additionally perform the FindBugs checks execute
mvn clean install findbugs:findbugs
Where to find the results?
You can find the results of the build in the corresponding .../target/ directories for each plugin, feature, etc... Of particular interest are:
- <mat_src>/org.eclipse.mat.updatesite/target/site/ - it contains a p2 repository with MAT features
- <mat_src>/org.eclipse.mat.product/target/products/ - it contains all standalone RCP applications
Building MAT Standalone RCPs from an Existing MAT Update Site
Configure and execute the build
- Open a console and go into the <mat_src>/parent folder (it contains the parent pom.xml)
- To produce only the standalone products, using an already existing MAT repository (i.e. without building the bundles again) specify that the build-release-rcp profile is used when you start maven:
mvn clean install -P build-release-rcp
- It will take the already existing MAT plugins/features from the repository specified by the mat-release-repo-url property in <mat_src>/parent/pom.xml. One can overwrite this location when calling maven. For example, to build products with the older 1.5.0 release, use:
mvn clean install -P build-release-rcp -Dmat-release-repo-url=http://download.eclipse.org/mat/1.5/update-site/
Where to find the results?
You can find the standalone products under <mat_src>/org.eclipse.mat.product/target/products/
Further Information
- The platforms for which RCPs are built are specified in the <mat_src>/parent/pom.xml file
Known Problems
Wrong file permissions
When building MAT on a Windows box, the RCPs for any other OS will not have the proper permissions (e.g. the executables won't have the x flag). Building under Linux or other non-Windows OS helps.
Hudson Job at Eclipse
The job at the Eclise Hudson server that performs this build is https://hudson.eclipse.org/mat/.
The job is configured to sign the plugins and features in the update site, and to upload all artifacts to the download server. One can download such nightly/snapshot builds here: http://www.eclipse.org/mat/snapshotBuilds.php
Info: Signing is activated by the build-server profile (i.e. with parameter '-P build-server' added to the maven command)