Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3010

Service aspects not created when services are in different module to entities and repositories

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 1.2.0.RELEASE
    • Fix Version/s: None
    • Component/s: PERSISTENCE
    • Labels:
    • Environment:
      ubuntu 11.04

      Description

      Roo does not create the two service ITDs when a service is created in a different Maven module to the one containing the reverse-engineered JPA entities and their repositories.

      For example with these three modules:

      • web module
      • service module (containing service)
      • persistence module (containing JPA entities and repositories)

      ... Roo only creates these service-related files:

      • Service.java
      • ServiceImpl.java

      But with these two modules:

      • web module
      • service & persistence module (containing service, JPA entities, and JPA repositories)

      ... Roo correctly creates:

      • Service.java
      • ServiceImpl.java
      • Service_Roo_Service.aj
      • ServiceImpl_Roo_Service.aj

      Here are the relevant scripts:

      Two module script
      project --topLevelPackage uk.co.stub.multiModuleTwoTeir --packaging POM
      module create --moduleName Web --topLevelPackage ~.web
      module focus --moduleName ~
      module create --moduleName ServicePersistence --topLevelPackage ~.ServicePersistence
      persistence setup --provider HIBERNATE --database MYSQL --databaseName test10 --hostName localhost --userName BILBO --password BAGGINS
      database reverse engineer --schema test10 --activeRecord false --includeTables "Plan GAddress HPAverage HPQTAround Houseprice" --package ~.domain --testAutomatically true
      repository jpa --interface ~.Repos.Houseprice --entity ~.domain.Houseprice
      repository jpa --interface ~.Repos.Hpaverage --entity ~.domain.Hpaverage
      repository jpa --interface ~.Repos.Hpqtaround --entity ~.domain.Hpqtaround
      service --entity ~.domain.Houseprice --interface ~.service.HousepriceService
      service --entity ~.domain.Hpaverage --interface ~.service.HpaverageService
      service --entity ~.domain.Hpqtaround --interface ~.service.HpqtaroundService
      Three module script
      project --topLevelPackage uk.co.stub.MultiModuleThreeTeir --packaging POM
      module create --moduleName Web --topLevelPackage ~.web
      module focus --moduleName ~
      module create --moduleName Service --topLevelPackage ~.Service
      module focus --moduleName ~
      module create --moduleName Persistence --topLevelPackage ~.Persistence
      persistence setup --provider HIBERNATE --database MYSQL --databaseName test10 --hostName localhost --userName BILBO --password BAGGINS
      database reverse engineer --schema test10 --activeRecord false --includeTables "Plan GAddress HPAverage HPQTAround Houseprice" --package ~.domain --testAutomatically true
      repository jpa --interface ~.Repos.Houseprice --entity ~.domain.Houseprice
      repository jpa --interface ~.Repos.Hpaverage --entity ~.domain.Hpaverage
      repository jpa --interface ~.Repos.Hpqtaround --entity ~.domain.Hpqtaround
      module focus --moduleName Service
      service --entity ~.domain.Houseprice --interface ~.service.HousepriceService
      service --entity ~.domain.Hpaverage --interface ~.service.HpaverageService
      service --entity ~.domain.Hpqtaround --interface ~.service.HpqtaroundService

        Attachments

          Activity

            People

            • Assignee:
              aswan Andrew Swan
              Reporter:
              stub999 stub
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: