Wednesday, March 2, 2011

Part I - Installation and Configuration of STS, Roo, and GWT

In This Post

I will provide a detailed guide to installing SpringSource Tool Kit (STS) and Google Web Toolkit (GWT) in a Windows environment.  We will be working with STS version 2.5.2, Spring Roo version 1.1.3, and GWT version 2.2.

The main reason for working with Roo version 1.1.3 is that it provides a fix for ROO-2188 and since version 1.1.3 was not yet released at the time this post went to press, we will be using a snapshot build.  Depending on when you downloaded it, STS 2.5.2 comes bundled with either Roo version 1.1.1 or version 1.1.2.  In this post we will be downloading Roo 1.1.3 separately and then linking it to STS 2.5.2 manually.  This will not be necessary with future releases of STS that include Roo version 1.1.3 or later.


Java Prerequisite

JDK should be installed on your machine before the installation of STS and GWT can commence. Note that GWT 2.2 has deprecated support for Java 1.5, which means warning messages will be displayed when building applications using this version of Java. I highly recommend installing or upgrading to Java 1.6 before starting the installation STS, Roo, and GWT.

Java can be downloaded @ the following link:
Download Java


Downloads

The installer for SpringSource Tool Suite 2.5.2 can be downloaded @ the following link:
Download STS 2.5.2

Released versions of Spring Roo can be downloaded @ the following link:
Download Spring Roo

I have uploaded the snapshot version of Spring Roo 1.1.3 that I've been working with.  You can download it @ the following link:
Spring Roo 1.1.3 Snapshot Build 6d6c5d4

More recent Spring Roo 1.1.3 snapshot builds can be downloaded @ the following link:
Download Spring Roo Snapshot Build


STS Setup

Launch the installer once download is complete. If the installer successfully finds a JRE on your machine, then the first screen for the 8-step installation wizard will be displayed:


Click Next to continue to step 2.

Read the license agreement and click Next to continue to step 3 if you approve.

Enter the directory path on your local drive for the STS installation and click Next to continue to step 4.

Uncheck the checkbox for Spring Roo, leaving STS, tcServer, and Maven checkboxes selected, and click Next to continue to step 5.

Enter the directory path for your JDK installation and click Next to continue to step 6.

Installation will start automatically at this step. Click Next to continue to step 7 once STS, tc Server, and Maven have all been successfully installed.

Select program group and shortcut preferences and click Next to proceed to the final step.

Keep the Launch SpringSource Tool Suite checkbox checked, click Finish, and STS will be run automatically.

STS will request the selection of a workspace directory at startup. Enter the path for the desired workspace directory and click OK to launch STS.





Lets install version 1.1.3 of Roo before we continue to configure STS.


Roo Setup

Unpack Spring Roo 1.1.3 to the same directory where Maven, tc Server
and STS were installed.

Add path to Roo's bin directory to the end of Path system variable.  Repeat this step with Maven's bin directory.

We will be using Roo and Maven from the Command Prompt when creating and building our projects.

Open a new Command Prompt window and verify that Roo can be run from the command line.





The next item on our to-do list is to link STS to our Roo installation.


Configuration

Now that we have successfully installed Roo 1.1.3 snaphot build, we can point STS to use this version of Roo.

To configure the Roo installation to be used by STS, go back to the STS window and select Preferences option from the Window menu.

Select Spring --> Roo Support on the Preferences window and click the "Add..." button.

Browse to select your Roo 1.1.3 installation directory and click OK.


The selected Roo directory will now be displayed in the list of Roo installations. Click OK to save changes and exit preferences.


With the installation and configuration of STS and Roo complete, we only have one piece of the puzzle remaining, which is the installation of necessary STS plugins.


Plugin Installation

On the STS welcome screen, click on the "Install Extension" link to choose and install the necessary STS extensions.


If you have closed the STS welcome screen, you can select Dashboard option from the Help menu and click the Extensions tab on the Dashboard screen.

STS will fetch a list of all available extensions and group them into various categories. Scroll down to the "Language and Framework Tooling" section, select DataNucleus Eclipse Plugin and Google Plugin for Eclipse (GPE), and click the Install button.

On the installation window, leave all components selected and click Next to progress through the selection and confirmation screens.  Notice that in addition to the plugins we selected in the previous step, we are also installing GWT and App Engine SDKs that GPE depends on.

Read the license terms and click Finish to proceed with installation when ready.








Congratulations! You now have completed the installation and configuration of all software necessary to start rapid development of Web applications using GWT, STS and Roo.


In The Next Post

We will be using the tools that we have installed in this post to generate a sample GWT Web application and running it.



IntroPart IPart IIPart IIIPart IVPart V



6 comments:

  1. Thank you for writing this up, so I don't need to ;-)

    I wonder if 1.1.3 is already stable enough to really use it in the project.


    Thanks,
    Michael

    ReplyDelete
  2. It has been smooth sailing for me with build 6d6c5d4, which includes the fix for ROO-2188. However, a new snapshot build is posted every day and stability depends on the contents of the build that you download. I recommend 6d6c5d4, if you still have access to it.

    ReplyDelete
  3. Tried the latest Snapshot today without problems. Excelent. Thanks.

    ReplyDelete
  4. i couldn't start sts using the latest jdk1.6.0_24. only by using an older version is doing the job!

    ReplyDelete
  5. and in the springsource-tool-suite-2.6.0.SR1-e3.6.2-win32 is now the roo-1.1.3.RELEASE included. but the roo cmd line seems to works only correctly in case if all files starting with "._" are deleted from all "spring-roo-1.1.3.RELEASE" subdirectories.

    ReplyDelete