Skip to content

Latest commit

 

History

History
58 lines (29 loc) · 2.83 KB

build_from_eclipse.adoc

File metadata and controls

58 lines (29 loc) · 2.83 KB

Building locally in Eclipse

Building in Eclipse is an optional alternative approach to building via commandline.

First, fetch the sources of the project you want to build from Github. For details, see Configuring Git Workflow - Sources.

Launch Eclipse, then select File → Import → Maven → Existing Maven Projects

import maven project

Browse for where you cloned the repo with which you want to work.

import maven project 2

Some projects require a full Maven build before they will compile properly in Eclipse with PDE. To solve this problem, you can either build using Maven via the commandline, or configure Eclipse to use m2e and Tycho to build the project instead of PDE. The import wizard will do this for you automatically.

import maven project 3 tycho
import maven project 4 tycho

Note that the Tycho configurator also includes PDE, so that it can be installed even if you’re using a version of Eclipse which doesn’t already include it.

import maven project 5 tycho pde

Once the project(s) are imported, you’ll want to build them. Eclipse will do this automatically with PDE, but if you want to explicitly launch Maven to perform a build, you can do so as well.

You can either do CTRL-SHIFT-X,M (Run Maven Build), or right-click the project and select Run As > Maven Build.

On the Main tab, set a Name and enter clean install -fae -e in the Goals line.

You can also add -DskipTests if you wanted build but not run your tests - or just check the Skip Tests checkbox.

Be sure to check Resolve Workspace artifacts, and, if you have a newer version of Maven installed, point your build at that Maven Runtime instead of the bundled one that ships with m2eclipse.

screenshot 2

On the JRE tab, make sure you’re using JDK 7 or higher.

Run configuration - JRE

On the Refresh tab, define which workspace resources you want to refresh when the build’s done.

Run configuration - Refresh

On the Common tab, you can store the output of the build in a log file in case it’s particularly long and you need to refer back to it.

Run configuration - Common

Click Run to run the build.

Eclipse console output

Now you can repeat the above step to build any other component or plugin or feature or update site from the JBoss Tools repos. Simply import the project(s) and build them as above.

More info

For a full list of build options and how to build on the commandline, see Building locally via commandline.