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:
oo-cookbookch01-recipe
directory, which contains the flight-app
Roo project.
To import the Roo project into Eclipse or IntelliJ IDEA follow the given steps:
perform eclipse
command from the Roo shell, shown as follows:roo> perform eclipse
Alternatively, you can use the perform
command
to execute the eclipse:eclipse
Maven goal of the Maven Eclipse plugin, shown as follows:
roo> perform command --mavenCommand eclipse:eclipse
perform command
to execute the idea:idea
Maven goal of the Maven IDEA plugin, shown as follows:roo> perform command --mavenCommand idea:idea
The perform eclipse
and perform command
commands are processed by the Maven add-on of Spring Roo. The perform
eclipse
command generates Eclipse IDE specific configuration files, such as .project
and .classpath
files. Behind the scenes, the perform
eclipse
command executes the eclipse:eclipse
goal of the Maven eclipse plugin.
The perform
command
is used to execute a Maven command. It accepts a single mandatory argument, mavenCommand
, which identifies the Maven goal to execute.
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 Cross
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.
3.137.212.71