Upgrading to the latest version of Roo

Roo simplifies upgrading from a previous version of your project to the latest version. All you need to do is to start the Roo shell from the root directory of your Roo project. Roo makes the adjustments to AspectJ ITD files that are applicable to the version.

In this recipe, we'll look at a Roo project that was created on version 1.1.3 and now being upgraded to 1.1.5.

Getting ready

Unzip the ch06-ldap-security.zip file that accompanies this book. Extracting the ZIP file will create a directory ch06-ldap-security, which represents a Roo project developed using Spring Roo 1.1.3.

How to do it...

Follow these steps to upgrade your version of Roo:

  1. Start the Roo shell from the ch06-ldap-security directory; you'll see the following output:
    Updated ROOTpom.xml [updated property 'roo.version' to '1.1.5.RELEASE']
    
    Updated SRC_MAIN_JAVA...domainBooking_Roo_ToString.aj
    ... SRC_MAIN_JAVA...webFlightDescriptionController_Roo_Controller_Finder.aj
    ...

    The output shows that one of the files modified by Roo is FlightDescriptionController_Roo_Controller_Finder.aj. If you look at this file you'll find that Roo has added a method responsible for searching Flight entity instances. Now, take a look at this sentence from Chapter 4, Web Application Development with Spring Web MVC:

    It is important to note that in Spring Roo 1.1.3, the method responsible for searching entity instances is not created in FlightDescriptionController_Roo_Controller_Finder.aj.

    This bug is resolved in Spring Roo 1.1.4 and above.

You can see that upgrading Roo to 1.1.5 automatically fixed the bug that existed in Roo 1.1.5.

How it works...

We mentioned earlier that Roo is responsible for managing the AspectJ ITD files in your Roo project. So, when you upgrade to a later version of Roo, Roo takes care of modifying the code in the AspectJ ITD files of your project.

There's more...

Roo's upgradation process is destructive, that is, you can't undo the changes made by Roo during the upgrade process. So, make sure that you keep a backup copy of your project before starting the Roo shell from the base directory of your project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.114.19