Announcement Announcement Module
No announcement yet.
Roo with existing project Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo with existing project

    currently I have a multi module maven project with one of them having the model classes. I would like to use roo for a new maven module or a current one in order to use its scaffolding.

    I think that there is 2 questions to be answered:

    1) How to use roo with an existing project without sts
    2) Is there any way of having the model and the web layers in 2 different maven modules?

  • #2
    1) Provided you have a standard maven project structure, you can load the Roo shell and start using the @Roo annotations like @RooEntity etc. You will need all the dependencies specified in your pom that a standard Roo project would have. It probably would be easier to scaffold a new empty Roo project and copy your entity classes over.
    2) Roo does not support multi-module maven projects at the moment and so you will have to have your web layer in the same project as your domain model.


    • #3
      Thank you for your quick response. I finally ended up coping dependencies and other files from a new "empty" roo project to the existing one. It would be great to have these thing ready with a shell command like project.

      As for the second part isn't there any way of using ready jpa entities (lets say they are also annotated with the roo annotations) packed as a jar with in a project? I was thinking of two separate roo projects, one holding the domain classes and one the web layer. Pack the domain classes and use it with the web layer.

      Most of existing maven project are multimodule projects so support for that kind of projects would be really helpfull.

      Thanks again for the quick response, I hope there will be better support for these things in order to make integration of roo and existing projects better!


      • #4
        As Roo annotations are source level retention, your jar wont contain any Roo annotations on the class file level. Furthermore all the Roo magic (from the ITDs) will already be merged into your class files. So using a jar with annotated Roo entities is not possible in this sense.

        Nevertheless support for multi module projects with Roo would be very interesting. As most projects (with at least some complexity) are very likely not just single-module projects. Some comments on this issue are discussed in ROO-120.
        Last edited by Nils Schmidt; May 21st, 2010, 12:37 PM.