Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

Difference between revisions of "MemoryAnalyzer/Building MAT With Tycho"

m (SWTBot)
m (Proxy Settings)
Line 22: Line 22:
=== Proxy Settings ===
=== Proxy Settings ===
If you need to set a proxy for Maven, a snippet like this can be added to the Maven settings file:
If you need to set a proxy for Maven, a snippet like this can be added to the Maven settings file:
<source lang="xml">
Line 31: Line 32:
More information on Maven settings:
More information on Maven settings:

Revision as of 05:10, 7 June 2013


This page describes how Memory Analyzer can be built using Maven/Tycho. The build will

  • build all bundles and features
  • execute all tests
  • (optional) run FindBugs static checks
  • produce a p2 repository with MAT features
  • produce RCPs for different platforms
  • sign and upload the produced artifacts (when executed on the Eclipse Hudson server)


SVN Team Provider Installation

To import MAT sources into the IDE one can use the SVN Team Provider. Have a look at the first several steps here: MemoryAnalyzer/Contributor_Reference#Setup

Maven Installation

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.


To build the org.eclipse.mat.ui.rcp.tests project, you will need the SWTBot plugins installed. Normally, just add an update site and install all the plugins. See the previous link for more installation instructions.

Proxy Settings

If you need to set a proxy for Maven, a snippet like this can be added to the Maven settings file:


More information on Maven settings:

Checkout MAT Sources from SVN

If you want to use/edit MAT sources in the Eclipse IDE and build the same sources with Maven, then you need to take care that the directory structure is preserverd while importing the MAT projects using the SVN team provider. The following steps describe a way to do this:

  • Open the 'SVN Repository Exploring' perspective
  • Add the MAT Subversion repository at:
  • Select 'trunk' and open the context menu
  • Select 'Find/Check Out As' from the context menu
  • Select 'Find projects in the children of the selected resource'
  • Select 'recursively'
  • Press 'Finish'
  • After some time, you'll get a window with the message: 'Following list contains projects that were automatically found on the repository. You can select project set you wish to be checked out into the workspace.'
  • Keep all projects selected
  • Select 'Check out as a projects into workspace'
  • Select 'Respect projects hierarchy'
  • Press 'Finish'

Preparation Steps

Which preparation steps are performed?

Parts of MAT depend on the IBM's DTFJ libraries, therefore one needs the libraries during the build. This preparation step will do the following:

  • download DTFJ (zipped "old" update site)
  • publish a p2 repository with DTFJ under <src_root>/prepare_build/target/repository

Execute the preparation step

  • Go in the <mat_src>/prepare_build/ directory
  • Execute
mvn clean install
  • This maven build is using the maven-antrun plugin to download the zip containing DTFJ. If you need to set a proxy you can do it using the standard Java settings, i.e. the command line will look like this:
mvn -DproxyHost=myProxyHost -DproxyPort=myProxyPort clean install

On the Hudson boxes at Eclipse the settings are defined as $ANT_OPTS


If the build was successful, then:

  • <mat_src>/prepare_build/target/repository/ will contain the p2 repository with DTFJ

Building MAT

Once the #Preparation Steps are done (normally only once) one can run the maven build for MAT.

Execute the build

  • Open a console and go into the <mat_src>/parent folder (there is the parent pom.xml)
  • To build MAT execute
mvn clean install
  • To build MAT and perform 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

Further Information

  • The platforms for which RCPs are built are specified in the <mat_src>/parent/pom.xml file
  • There are two script files (build.bat and which should combine the preparation steps and the real build. However, both still need some improvements

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

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:

Info: Signing is activated by the build-server profile (i.e. with parameter '-P build-server' added to the maven command)

Back to the top