Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2562

Aspectj files deleted in for Spring ROO multi-module project

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: None
    • Component/s: ROO
    • Labels:

      Description

      Create a multi-module spring roo project with at least one web mvc controller and import into STS.
      The initial importation usually works but if the roo shell is closed and reopened the controller aspectj files get deleted.

      An example roo script

      project --packaging pom --topLevelPackage com.foo --projectName foo
      module create --moduleName module1 --packaging jar --topLevelPackage com.foo --parent com.foo:foo:0.1.0.BUILD-SNAPSHOT
      module focus --moduleName ~
      module create --moduleName module2 --packaging war --topLevelPackage com.foo --parent com.foo:foo:0.1.0.BUILD-SNAPSHOT
      web mvc setup
      module focus --moduleName module1
      jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
      entity jpa --class MyEntity
      field string --fieldName entityName
      module focus --moduleName module2
      web mvc all --package ~.mvc
      

      The message in the roo shell as it destroys the controller:

      roo> Deleted SRC_MAIN_JAVA\com\foo\mvc\MyEntityController_Roo_Controller.aj - empty
      Deleted SRC_MAIN_JAVA\com\foo\mvc\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj - empty
      

        Activity

        Hide
        Laurie Chan added a comment - - edited

        I can get the same symptoms with the multimodule sample app in roo 1.2.1
        Run the multimodule.roo script
        Import the generated project into STS
        and at some randomly chosen point STS will decide to delete the controller aspects
        eg in this example it was triggered by selecting maven - update config

        Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER.
        roo> Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VetController_Roo_Controller.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VisitController_Roo_Controller_Finder.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VisitController_Roo_Controller.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\PetController_Roo_Controller_Finder.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\PetController_Roo_Controller.aj - empty
        Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\OwnerController_Roo_Controller.aj - empty
        

        Is there a way to disable the roo-shell in STS? Without some sort of workaround for this STS is unusable for roo multimodule projects.

        So far the only workaround I have found is to use use plain eclipse instead of STS for roo multimodule projects

        Show
        Laurie Chan added a comment - - edited I can get the same symptoms with the multimodule sample app in roo 1.2.1 Run the multimodule.roo script Import the generated project into STS and at some randomly chosen point STS will decide to delete the controller aspects eg in this example it was triggered by selecting maven - update config Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER. roo> Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VetController_Roo_Controller.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VisitController_Roo_Controller_Finder.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\VisitController_Roo_Controller.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\PetController_Roo_Controller_Finder.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\PetController_Roo_Controller.aj - empty Deleted SRC_MAIN_JAVA\com\example\petclinic\ui\mvc\OwnerController_Roo_Controller.aj - empty Is there a way to disable the roo-shell in STS? Without some sort of workaround for this STS is unusable for roo multimodule projects. So far the only workaround I have found is to use use plain eclipse instead of STS for roo multimodule projects
        Hide
        Javier Beneito Barquero added a comment -

        I don't think it's a problem of STS. If you open a Roo Shell within the web module directory, using the command line, it will also delete the .aj files.

        Nonetheless, there is no problem if you open the Roo shell within the parent directory.

        Unfortunately, I don't know how to open the Roo shell for the parent module in the STS (in spite that I have the parent project imported in the workspace)

        See: http://forum.springsource.org/showthread.php?128269

        Show
        Javier Beneito Barquero added a comment - I don't think it's a problem of STS. If you open a Roo Shell within the web module directory, using the command line, it will also delete the .aj files. Nonetheless, there is no problem if you open the Roo shell within the parent directory. Unfortunately, I don't know how to open the Roo shell for the parent module in the STS (in spite that I have the parent project imported in the workspace) See: http://forum.springsource.org/showthread.php?128269

          People

          • Assignee:
            Leo Dos Santos (c)
            Reporter:
            Laurie Chan
          • Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              First Response Date: