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.
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.
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
.
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.
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.