Eclipse Integration

Before getting started developing portlets, let's get Eclipse setup. Maven 2 can create Eclipse project and classpath files from the project POMs, automatically bringing in all dependencies. In the jetexpress project directory, run the following Maven command:

mvn eclipse:eclipse

Since the project is a multi-module project, Maven will generate two project: one for each submodule. There will be no Eclipse project for the root POM, since it does not produce any artifact.

Now import the new projects. From the Eclipse menu, select File->Import, then Existing Projects into Workspace, and browse to your jetexpress directory:

Two project will show up in the list: jetexpress-pa and jetexpress-portal. Import both projects.

Next, set up a classpath variable to point at your local Maven repository, effectively resolving the jars for Eclipse. In Eclipse, go to Window->Preferences->Java->Build Path->Classpath Variables->New and enter the location of your local Maven repository (typically this is inside a .m2 directory in your user home/profile directory.

Next

You are now ready to start developing with Eclipse, and create your first portlet!

Previous - Next