GateIn is developed using the Apache Maven lifecycle process and this guarantees that the project can be used with any standard development environment.
In this recipe, we will learn how to import the GateIn project in Eclipse IDE (you can use any other IDE that supports Maven). You will also see how to install JBoss tools in Eclipse to add support for developing standard portlets and all Java EE components provided by JBoss.
Install Eclipse on your machine, launching the executable and following the installation instructions.
How to do it...
Set up your development environment following these steps:
Launch Eclipse and create a new workspace dedicated to GateIn.
Click on Help | Eclipse Marketplace.
Search jboss tools and click on the Go button.
Locate the JBoss Tools version required for your specific Eclipse version and click on the Install button.
In the Confirm Selected Features window, select all the items and click on the Next button.
In the Install Details window, click on the Next button.
In the Review Licenses window, read and accept the terms of the license agreements and click on the Finish button.
Wait for the installation process of JBoss tools to complete. Once the installation is finished, restart Eclipse.
After the restart, you should see the overview of what you can do with JBoss tools with a similar tab in your Eclipse environment:
Right-click on the Package Explorer tab and select Import.
Browse the Maven category and select Existing Maven Projects and press the Next button.
Insert as Root Directory the GateIn source root folder that you have created in the previous recipe.
Click on the Next button and then click on Finish.
Be sure at the end of the import process to update the project configuration of all the Maven modules— in the Package Explorer window select all the modules, right-click, then select Maven | Update Project Configuration and finally click on OK.
How it works...
The source code of GateIn is based on Maven, but by default, Eclipse IDE does not support it. The JBoss tools package includes the m2eclipse plugin that allows managing Maven projects inside Eclipse IDE. So in order to develop your own solutions make sure to use an IDE that supports Maven.
We have configured Eclipse to manage JBoss middleware and Maven projects and then we have imported the GateIn source code to let you contribute to the product or create your own customizations.
The following are all the example modules available in the GateIn source code:
GateIn Portal Sample
GateIn Portal Sample Extension
Sample Configuration
Sample Ear
Sample War
Sample Jar
GateIn Portal Sample Portal
GateIn Portal examples—Portlets
API Sample Portlet
JSF Sample Portlet
JSP Sample Portlet
Standard Sample Portlet
Struts Sample Portlet
Resource Serving Sample Portlet
GateIn Skin Sample
See also
The Building and installing GateIn from the source code recipe