Over a million developers have joined DZone.

Hacking The 'Roo... Removing The Default Web Plugins

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

Let's say you love the productivity of Roo up to a point, but that point happens to be the web. Unfortunately, the default Spring MVC patterns installed in a Roo web app are pretty heavyweight - adding localization, tiles, tags, jspx, etc...

If you ever set up and then backed-out a Roo configuration for the web, and then did the wrong thing and found it regenerated the default web site scaffold, you may have sighed under your breath that you just wish Roo didn't do that.

Well, you have an option. I'd say it's rather voodoo, but if you want to get prototyping in some web-based applications and just make a simple Spring MVC front-end, but don't want to get Roo involved in anything above, say, the service tier, here's what you can do:

  • Make a custom Roo installation directory
  • Expand Roo
  • remove the bundles for web, webmvc, web-json, gwt, jsf, selenium (and maybe one or two more I can't remember)
  • remove the cache directory from Roo (it copies the deployed add-ons into this cache as part of the Equinox OSGi container).
  • start up Roo, and see if it sends any OSGi errors your way. If it does, you've forgotten to remove a bundle. Try again - shut down the shell, follow the removal step, clear the cache directory, and restart.

There you are. Now, you can enjoy using Roo for the Aspect-J ITDs, and to make modeling data easier, but if you are simply using Spring MVC for a RESTful front-end, now Roo doesn't get in your way anymore.

You can always link your roo.sh shell script for this version of roo to something like /usr/bin/roo-lite.

Happy Roo'ing.


Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.


Published at DZone with permission of Ken Rimple, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}