As explained in the Setting up Roo recipe, you can either use STS or Eclipse with STS components installed to work with Roo projects. Alternatively, you can create necessary project files to import the Roo project into Eclipse or IntelliJ IDEA IDE (for working directly with Java sources and configuration files) and run the Spring Roo shell separately in standalone mode to execute Roo commands.
In this recipe, we look at how you can import a Roo project into Eclipse or IntelliJ IDEA by executing commands provided by Spring Roo.
Start the Roo shell from the
C:\roo-cookbook\ch01-recipe directory, which contains the
flight-app Roo project.
To import the Roo project into Eclipse or IntelliJ IDEA follow the given steps:
To create Eclipse-specific project files, execute the
perform eclipsecommand from the Roo shell, shown as follows:
roo> perform eclipse
Alternatively, you can use the
commandto execute the
eclipse:eclipseMaven goal of the Maven Eclipse plugin, shown as follows:
roo> perform command --mavenCommand eclipse:eclipse
To create IntelliJ IDEA specific project files, use the
perform commandto execute the
idea:ideaMaven goal of the Maven IDEA plugin, shown as follows:
roo> perform command --mavenCommand idea:idea
perform eclipse and
perform command commands are processed by the Maven add-on of Spring Roo. The
eclipse command generates Eclipse IDE specific configuration files, such as
.classpath files. Behind the scenes, the
eclipse command executes the
eclipse:eclipse goal of the Maven eclipse plugin.
If you are using any IDE other than STS, then ensure that you install AJDT (AspectJ Development Tools), as it gives better development experience when working with projects that make use of AspectJ aspects. For instance, when you open a Java source file in Eclipse IDE (that has AJDT installed), the
Reference tab shows the various AspectJ declarations that apply to the selected Java source file, and you can select these declarations to open the corresponding AspectJ ITD files.
Refer to the Setting up Roo recipe to know how to use STS or Eclipse (with STS components) for developing with Spring Roo
Refer to the Removing Roo-specific details from your project recipe in Chapter 7, Developing Add-ons and Removing Roo from Projects to see how you can convert your Roo project into a normal Java project