Over a million developers have joined DZone.

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

· Java Zone

Discover how AppDynamics steps in to upgrade your performance game and prevent your enterprise from these top 10 Java performance problems, brought to you in partnership with AppDynamics.

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.

Ken

The Java Zone is brought to you in partnership with AppDynamics. AppDynamics helps you gain the fundamentals behind application performance, and implement best practices so you can proactively analyze and act on performance problems as they arise, and more specifically with your Java applications. Start a Free Trial.

Topics:

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.

SEE AN EXAMPLE
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.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}