Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Roo 1.1 Cookbook

You're reading from   Spring Roo 1.1 Cookbook Over 60 recipes to help you speed up the development of your Java web applications using the Spring Roo development tool

Arrow left icon
Product type Paperback
Published in Sep 2011
Publisher Packt
ISBN-13 9781849514583
Length 460 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Spring Roo 1.1 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Spring Roo 2. Persisting Objects Using JPA FREE CHAPTER 3. Advanced JPA Support in Spring Roo 4. Web Application Development with Spring Web MVC 5. Web Application Development with GWT, Flex, and Spring Web Flow 6. Emailing, Messaging, Spring Security, Solr, and GAE 7. Developing Add-ons and Removing Roo from Projects Index

Importing a Roo project into Eclipse or IntelliJ IDEA IDE


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.

Getting ready

Start the Roo shell from the C:\roo-cookbook\ch01-recipe directory, which contains the flight-app Roo project.

How to do it...

To import the Roo project into Eclipse or IntelliJ IDEA follow the given steps:

  1. To create Eclipse-specific project files, execute the 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
    
  2. To create IntelliJ IDEA specific project files, use the perform command to execute the idea:idea Maven goal of the Maven IDEA plugin, shown as follows:

    roo> perform command --mavenCommand idea:idea
    

How it works...

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.

Note

Maven IDEA and Eclipse plugins are configured in the pom.xml file by Spring Roo at the project creation time; you don't need to add them to your Roo project to use the commands shown in this recipe.

There's more...

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.

See also

  • 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

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image