User Tools

Site Tools


contributorguide:eclipse

Working on Sigmah with the Eclipse IDE

Import Sigmah project

First, open File > Import… and choose Existing Maven Projects:

Click Next and Eclipse will ask you where the project source code is so click Browse and select the directory created when you cloned the repo (this is the directory which contains the pom.xml file).

Eclipse should automatically detect the existing pom.xml file and configure the Eclipse project to match the POM configuration. Click the Finish button.

Fixing the build path

Eclipse, by default, do not recognize the source directory containing the Java code generated by the Maven process. So, at first, you will get dozen of Java compilation errors due to the fact that Eclipse can not find UIConstants and UIMessages classes.

You must fix that by making Eclispe consider the target/generated-sources/java directory as a source path.

To do so, right-click on the ''target/generated-sources/java'' in the ''sigmah'' project folder in the ''Package explorer'' tab and choose ''Build path'' and ''Use as source folder''.

Enable the sigmah-dev maven profile

If you want to build the project from Eclipse instead of using the maven command-line, don't forget that Eclipse will not use the sigmah-dev profile by default so you must configure Eclipse to always make the sigmah-dev maven profile active.

Right-click on the sigmah project in the package explorer and choose Properties. Then, find the Maven configuration panel and, in the Active Maven Profiles field, add sigmah-dev.

Deploy to tomcat 8 from Eclipse

Note: if you don't find any of those options, check that you are running Eclipse Java EE edition, the Eclise Java edition lack this functionality.

Select root of the project in the Project explorer tab then click on the Run button (a green play symbol) and choose Run on Server.

Find Tomcat 8 and hit the Next button.

You must now tell Eclipse where your Tomcat is installed. This is the place where you unzipped the tomcat archive.

Make sure that the “sigmah” artifact will be deployed, it should be in the right panel. If it is in the left-one, move it to the left to mark it as to-be-deployed.

Pro tip: open Window → Show view → Other… and choose Server → Servers. You will get a new panel with buttons to start/stop/refresh.

Install GWT plugin

You may find useful to install the GWT plugin for Eclipse. You can read about using Eclipse on the official GWT website and follow instructions about installing the plugin.

contributorguide/eclipse.txt · Last modified: 2016/03/31 11:46 by bleny