Jump to: navigation, search

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

Line 31: Line 31:
  
 
=== Execution ===
 
=== Execution ===
* Go in the /prepare_build directory
+
* Go in the <mat_src>/prepare_build directory
 
* Execute
 
* Execute
 
<code>mvn clean install</code>
 
<code>mvn clean install</code>
Line 41: Line 41:
 
=== Verify ===
 
=== Verify ===
 
If the build was successful, then:
 
If the build was successful, then:
* /prepare_build/target/repository will contain the p2 repository with DTFJ
+
* <mat_src>/prepare_build/target/repository will contain the p2 repository with DTFJ
* /org.eclipse.mat.targetdef/mat-site.target will be modified to point to this repository
+
* <mat_src>/org.eclipse.mat.targetdef/mat-site.target will be modified to point to this repository
  
== Build ==
+
== Building MAT ==
 +
Once the [[#Preparation Steps]] are done (normally only once) one can run the maven build for MAT.
 +
 
 +
=== Execute the build ===
 +
* Go to the root of the sources (there is the parent pom.xml), i.e. <mat_src>/pom.xml
 +
* To simply build MAT execute
 +
<code>mvn clean install</code>
 +
* To build MAT and perform findbugs checks execut
 +
<code>mvn clean install findbugs:findbugs</code>
 +
=== 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>/product/target/products - it contains all standalong RCP applications

Revision as of 06:47, 27 May 2011

Introduction

This page is describes how Memory Analyzer p2 repository and RCP applications can be built using Maven/Tycho.

Prerequisites

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 http://maven.apache.org/download.html.

Proxy Settings

If you need to set 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

Preparation Steps

What is done

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
  • modify the target platform definition used for the rest of the build

Execution

  • 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 proxy you can do it using the standard Java settings, i.e. the command line will look like this:

mvn -Dhttp.proxyHost=myProxyHost -Dhttp.proxyPort=myProxyPort clean install

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

Verify

If the build was successful, then:

  • <mat_src>/prepare_build/target/repository will contain the p2 repository with DTFJ
  • <mat_src>/org.eclipse.mat.targetdef/mat-site.target will be modified to point to this repository

Building MAT

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

Execute the build

  • Go to the root of the sources (there is the parent pom.xml), i.e. <mat_src>/pom.xml
  • To simply build MAT execute

mvn clean install

  • To build MAT and perform findbugs checks execut

mvn clean install findbugs:findbugs

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>/product/target/products - it contains all standalong RCP applications