Griffon
  1. Griffon
  2. GRIFFON-374

Multiple calls of CreateMvc generate duplicate group entries

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3-beta-1
    • Fix Version/s: 1.4.0
    • Component/s: cli
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Calling create-mvc with the same arguments results in duplicate entries in Application.groovy (probably on an Addon descriptor as well)

      application {
          title = 'Bar'
          startupGroups = ['bar']
      
          // Should Griffon exit when no Griffon created frames are showing?
          autoShutdown = true
      
          // If you want some non-standard application class, apply it here
          //frameClass = 'javax.swing.JFrame'
      }
      mvcGroups {
          // MVC Group for "bar"
          'bar' {
              model      = 'bar.BarModel'
              view       = 'bar.BarView'
              controller = 'bar.BarController'
          }
      
          // MVC Group for "bar"
          'bar' {
              model      = 'bar.BarModel'
              view       = 'bar.BarView'
              controller = 'bar.BarController'
          }
      
      }
      

      However existing MVC files prompt for an overwrite confirmation

      Model BarModel.groovy already exists. Overwrite? [y/n] (y, n)
      y
      Created Model for Bar
      View BarView.groovy already exists. Overwrite? [y/n] (y, n)
      y
      Created View for Bar
      Controller BarController.groovy already exists. Overwrite? [y/n] (y, n)
      y
      Created Controller for Bar
      IntegrationTests BarTests.groovy already exists. Overwrite? [y/n] (y, n)
      y
      Created IntegrationTests for Bar
      

        Activity

        Show
        Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon/commit/2a2c3503dc55faef6e3ab62897b51189c542bd07

          People

          • Assignee:
            Andres Almiray
            Reporter:
            Andres Almiray
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: