Announcement Announcement Module
Collapse
No announcement yet.
Problem creating multiple nested modules within one parent. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem creating multiple nested modules within one parent.

    Using the petclinic multimodule sample script I have changed this to create another additional ui module under the ui pom project.

    I want to end up with this structure

    Petclinic - pom

    ui - pom (parent) contains 2 child modules : 1) mvc - war- (mod 1) ; 2) mvc2 - another additional war (mod 2)

    core - jar (mod 3)

    I have used the existing mvc module (mod 1) which ships in the original script with a few name changes to use as my mod 2. I have done this for timeliness - I expect that another ui module could hold another view technology provided by roo.

    I have found 2 errors when trying to reproduce the above project structure with both 1.2.0 REALEASE and 1.2.1 latest build..

    Script 1 : is the petclinic script "as is" with the mvc section repeated at the end of the script (with sufficient changes to avoid naming clashes) and thus allowing the structure of the nested modules above.

    The pertinent part :

    module focus --moduleName ~
    module create --moduleName ui --topLevelPackage com.example.petclinic.ui --packaging POM
    module create --moduleName mvc --topLevelPackage com.example.petclinic.ui.mvc

    web mvc setup
    web mvc all --package ~
    web mvc finder all

    web mvc language --code de
    web mvc language --code es

    selenium test --controller ~.OwnerController
    selenium test --controller ~.PetController
    selenium test --controller ~.VetController
    selenium test --controller ~.VisitController

    module focus --moduleName ui/mvc
    logging setup --level INFO

    module focus --moduleName ui
    module create --moduleName mvcstub --topLevelPackage com.example.petclinic.ui.mvcstub


    web mvc setup
    web mvc all --package ~
    web mvc finder all

    web mvc language --code de
    web mvc language --code es

    selenium test --controller ~.OwnerController
    selenium test --controller ~.PetController
    selenium test --controller ~.VetController
    selenium test --controller ~.VisitController

    module focus --moduleName ui/mvcstub
    logging setup --level INFO

    >> This script fails with " Identifier '/home/stub/systems/home/sts/wsHome3stsT/multimodulescript1/ui/mvcstub' is not a child of '.... " when trying to create module mvcstub

    Also on failure the focus is placed on "core|~.mvcstub"


    Script 2 : I have changed the order in which the 2 ui modules are created (I create both mod 1 and mod 2 first ), this allows the creation of both mods under "parent", then focus on each mod in turn(1 then 2) and run the web mvc commands. When I come to create the controllers in the mod 2 (having focussed on the 2nd module)with web mvc all --package ~ , roo finds the controllers created in mod 1 stating "Introducing into existing controller 'com.example.petclinic.ui.mvc.OwnerController' mapped to '/owners"

    module focus --moduleName ~
    module create --moduleName ui --topLevelPackage com.example.petclinic.ui --packaging POM
    module create --moduleName mvcstub --topLevelPackage com.example.petclinic.ui.mvcstub
    module focus --moduleName ui
    module create --moduleName mvc --topLevelPackage com.example.petclinic.ui.mvc

    web mvc setup
    web mvc all --package ~
    web mvc finder all

    web mvc language --code de
    web mvc language --code es

    selenium test --controller ~.OwnerController
    selenium test --controller ~.PetController
    selenium test --controller ~.VetController
    selenium test --controller ~.VisitController

    module focus --moduleName ui/mvc
    logging setup --level INFO

    module focus --moduleName ui/mvcstub

    web mvc setup
    web mvc all --package ~
    web mvc finder all

    web mvc language --code de
    web mvc language --code es

    selenium test --controller ~.OwnerController
    selenium test --controller ~.PetController
    selenium test --controller ~.VetControAttachment Attachment ller
    selenium test --controller ~.VisitController

    module focus --moduleName ui/mvcstub
    logging setup --level INFO

    >> this order of module creation manages to create the individual modules in the correct structure but falls over when trying to create the selenium test classes as they refer to controllers in package mvcstub which have not been created because the web mvc all --package ~ has found the controllers in package mvc

    Also on failure the focus is placed onto "core|~"

    I guess I'm doing something wrong here just can't see it. Any help would be greatly appreciated. Please comment on my use case. Is the structure of my project obscure or unnecessary.

    Attached are the 2 create scripts I had to rename them to txt files to allow uploading so a rename to .roo will be necessary to reproduce. Couldn't upload the backup files as they were too large for the forum limits.
    Attached Files
    Last edited by stub999; Jan 21st, 2012, 04:33 PM. Reason: lost detail on project structure trying to create
Working...
X