Archive for the ‘roo’ Category

Hello World… Using Spring Roo 1.1.0M1 under STS 2.3.3M1

without comments

The first day’s Google I/O keynote shows how much work has been done to integrate Spring Roo with GWT. Despite the fact that the demo is not smoothly done, this is kind of interesting combination. If before we have to do all the work to integrate Spring + Hibernate + GWT manually, now the work has already been done. Even nicer, it has tight integration with Eclipse, my favorite Java IDE :D .

Unfortunately the information on how to start creating and playing is not integrated and I spent quite some times to finally run a very simple application using all the technologies. Let me share my experience here…

  1. What you need first is an STS 2.3.3M1. It’s not that easy to find, so here is the link: http://www.springsource.com/products/springsource-google-download. Unfortunately, you have to fill the forms as I can’t find another way to download it without filling the form. Warning, you need STS 2.3.3M1 not release 2.3.2.
  2. Next you have to run the installer. I had no problem for this and at the end, the STS is nicely installed on my computer.
  3. Run the STS and put the workspace location as you like.
  4. If you start a new workspace you’ll get something like this:
  5. Just close the Welcome page and you will get something like this:
  6. You’ll need to install DataNucleus Eclipse Plugin and Google Plugin for Eclipse. To do so, go the third tab under the dashboard and select both extensions. Install it and restart the STS.
  7. We can start creating a new project. Create a Roo project with name ‘hello’ and top level package ‘com.hello’. Wait a bit for Maven to download all the dependencies.
  8. You can use Roo Shell to start adding entities to the project. Do following command:
    persistence setup --provider DATANUCLEUS --database HYPERSONIC_IN_MEMORY
    entity --class ~.server.domain.Employee --testAutomatically
    field string --fieldName userName --sizeMin 3 --sizeMax 30
    gwt setup

  9. After that, you should right click on the project and select Google -> Web Toolkit Settings…. And then just click OK. I don’t know what happens but without it the application complain that it can’t find GWT SDK.
  10. Again, right click on the project. Select Maven -> Enable Dependency Management.
  11. Now you can run the application by right click on it and select Run -> Web Application. There you go you got the GWT version of the application.
  12. Alternatively is to run mvn gwt:run from console or from Eclipse.

That’s that!

Related posts:

  1. Maven Plugin: Java Code Formatter
  2. Using Eclipse WTP for developing application under Websphere Application Server Community Edition (WAS CE)
  3. Spring Tips: Initializing bean using EasyMock for unit test

Hello World… Using Spring Roo 1.1.0M1 under STS 2.3.3M1 originally appeared on satukubik on May 21, 2010.

Written by Nanda Firdausi

May 21st, 2010 at 9:46 pm

Posted in eclipse,gwt,roo,spring,sts