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.
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.
Follow these steps to upgrade your version of Roo:
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.
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.
3.142.114.19