Announcement Announcement Module
Collapse
No announcement yet.
Tweaking Spring Roo code generation? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


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

      Comment


      • #4
        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.

        Comment


        • #5
          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.

          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".

          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!

          Comment

          Working...
          X