Thursday, March 4, 2010

Spring Roo with NetBeans

I am a NetBeans user and there are no reason to change the IDE for any tool as NetBeans try to accommodate most of the frameworks and tools. However most of the modern frameworks/tools has easy integration with the Eclipse, Spring Roo is latest in the list. I started evaluating Spring Roo for one of our internal small test application.

Due to the fact that Spring Roo integrated already with Spring Tool Suite (STS) they support using STS IDE for all development. After few here and there i could finally run as well as modify the Spring Roo application in NetBeans IDE.

Maven is a compulsory requirement (until the Ant/Ivy integration is available) for Spring Roo to run, so make sure Maven is configured and NetBeans is referring to the proper Maven repository.

1. Create the project from  the Roo Shell and fill the required artifacts for the basic startup.

2. Do perform:eclipse to generate the Eclipse artifacts and open the project in STS

3. Right click on the project and go to the Refactoring, select Push All option. A dialog box will show with number of files, select all the files and click on Ok. This will convert all the AspectJ code (.aj) to pure Java code. This is the point for which Spring Roo is considered to be non-intrusive and you can actually detach the Spring Roo from the application altogether.

4. Open the created application in NetBeans through Import Eclipse Project/Workspace option. Do clean and build and go for Run application. If not configured anything NetBeans will ask for the Web Server which can be selected to installed Apache Server.

Still there are many things in Spring Roo you can not do in NetBeans but for all those things, again one can go back to the command prompt or to the STS for required changes, refactor again and refresh the NetBeans project to take the new changes.


  1. Have u built a complete web app using roo .. with all customised settings, with 1 -1 or any other type of reln

  2. spring roo and gwt are working together. so, a project was built on roo and gwt can be edited via netbeans?