Results 1 to 5 of 5

Thread: Tweaking Spring Roo code generation?

  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Default Tweaking Spring Roo code generation?

    I've been playing around with Spring Roo and I'd love to use it for a project at work. However, it would be much easier if I could get Roo to play nice with the existing infrastructure here. To do so, I need the ability to configure/modify/add to the code that Roo generates.

    For example, when creating a new Roo project, it would be nice if I could get it to generate a few extra files in the root directory. When creating a new entity, I need a certain XML file to be modified. I know I can do this all by manually, but it's a tedious and error-prone process that would be best to automate.

    What's the best way to accomplish this?

    * Check out the Roo source code and make changes? If so, where in the source tree do I look? Is there any documentation on the source code architecture?

    * Some sort of plugin & configuration? I've seen some add-ons for Roo, so maybe I can create one that does this extra code generation at the right time?

  2. #2
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Post

    An add-on is definitely the way to go.

    Modifying the Roo source isn't a viable long-term option, as you will have version control issues down the track (merging, etc) when the Roo team creates a new release.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  3. #3
    Join Date
    Jul 2010
    Posts
    3

    Default

    Thanks for the reply. Is there a guide to making Spring Roo add-ons somewhere?

  4. #4
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    667

    Lightbulb

    I knew you were going to ask that!

    Here's a link to the reference docs, although that chapter is largely stubbed at the moment (vote for ROO-631 if you want it completed). There is some information about the shell commands that create add-ons.

    If you speak Spanish, you could go here.

    In the meantime, have a look at Ben's deep dive presentation.

    There might be other resources of which I'm not aware; maybe others could suggest some.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

  5. #5
    Join Date
    Jul 2010
    Posts
    3

    Default

    Quote Originally Posted by andrews View Post
    Here's a link to the reference docs, although that chapter is largely stubbed at the moment
    Heh, you aren't kidding. The whole chapter is a large TODO.

    Quote Originally Posted by andrews View Post
    If you speak Spanish, you could go here.
    My Spanish is a bit rusty, but it looks like the only content of the docs here is the phrase "En breve".

    Quote Originally Posted by andrews View Post
    In the meantime, have a look at Ben's deep dive presentation.
    Ah, this looks very helpful. Going through it now, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •