Spring Roo
  1. Spring Roo
  2. ROO-120

Support multi module Maven projects

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.2.0.RC1
    • Component/s: BUILD
    • Labels:
      None

      Description

      This is the feature I would like to see in the future. Below are the layout I can think for now:

      Initially, Roo will create parent, core, and webapp projects

      1. parent project:
      This is pom project and the place where we call the Roo shell and use its command to create modules. Module's name format is something like (project-name)module??? or (project-name)plugin???. The modules list in this project pom is handled by Roo generator. The list contains: core, all module, and webapp projects. All the modules inside will inherit the parent project.

      The pom of this project also has dependencies of application frameworks like spring, jpa, etc.

      Maybe we can use this project to build and run the full tests.

      2. core project (jar)
      It contains main application contexts and reusable codes shared between module projects: helpers, utils, base classes, general auditing aspects like loggers etc.

      3. module project (can be one or many) (jar)
      The module project contains the main components like controllers, models, services/daos, templates and resources which belong to the controllers of the module. Module project has the core project as its default dependency. The dependencies between module projects are managed by the developers.

      4. webapp project (war)
      It contains web configurations. It doesn't contain any component codes, templates, etc. But it contains the web resources that are shared between module projects. The dependencies in webapp are automatically handled by Roo generator during module project creation. The dependencies in webapp includes: core and all module projects. During the packaging, all module projects will be jar-ed and stored in WEB-INF/lib of the war.

        Issue Links

          Activity

          Hide
          Ken Rimple added a comment -

          Fantastic, Andrew. That was just what we needed. I'll test that out and then figure out where I can put it in Roo in Action - interesting thing is that it doesn't quite fit anywhere yet, but we're in final review so I can't add a chapter so it's gotta be a short segment somewhere. This is really great stuff and quite powerful.

          Show
          Ken Rimple added a comment - Fantastic, Andrew. That was just what we needed. I'll test that out and then figure out where I can put it in Roo in Action - interesting thing is that it doesn't quite fit anywhere yet, but we're in final review so I can't add a chapter so it's gotta be a short segment somewhere. This is really great stuff and quite powerful.
          Hide
          Bruce Edge added a comment -

          Another side effect of this problem.
          This is not related to scaffolding, rather to the ability to manually subclass an entity outside of the current project:
          http://forum.springsource.org/showthread.php?117209-Subclassed-entities-java.lang.IllegalArgumentException-Unknown-entity

          An annotation to disable the auto-add of the EntityManager would address this sub-problem, maybe @NoAutoEntityManager in the subclass could tell roo that it should not add it.

          Show
          Bruce Edge added a comment - Another side effect of this problem. This is not related to scaffolding, rather to the ability to manually subclass an entity outside of the current project: http://forum.springsource.org/showthread.php?117209-Subclassed-entities-java.lang.IllegalArgumentException-Unknown-entity An annotation to disable the auto-add of the EntityManager would address this sub-problem, maybe @NoAutoEntityManager in the subclass could tell roo that it should not add it.
          Hide
          Andrew Swan added a comment - - edited

          The coding for this feature is finished. Full documentation will be produced as ROO-2982, covering:

          • usage
          • capabilities
          • limitations
          • design decisions
          Show
          Andrew Swan added a comment - - edited The coding for this feature is finished. Full documentation will be produced as ROO-2982 , covering: usage capabilities limitations design decisions
          Hide
          Sai Hegde added a comment -

          Kudos to the Spring team in having this put out in the 1.2 release.

          Show
          Sai Hegde added a comment - Kudos to the Spring team in having this put out in the 1.2 release.
          Hide
          gavinlau added a comment -

          I think the issue has not completed.
          Controller(MVC) or ManageredBean(JSF) must in the war module in 1.2 release.
          But people need:
          The module project contains the main components like controllers, models, services/daos, templates and resources which belong to the controllers of the module

          Show
          gavinlau added a comment - I think the issue has not completed. Controller(MVC) or ManageredBean(JSF) must in the war module in 1.2 release. But people need: The module project contains the main components like controllers, models, services/daos, templates and resources which belong to the controllers of the module

            People

            • Assignee:
              Andrew Swan
              Reporter:
              Donny A. Wijaya
            • Votes:
              155 Vote for this issue
              Watchers:
              94 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: