Griffon
  1. Griffon
  2. GRIFFON-521

create-app with hyphenated name results in non-working app

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1
    • Component/s: cli
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I ran the command:

      griffon create-app groovy-script
      

      Which makes the app, but then

      griffon run-app
      

      results in:

      2012-06-13 09:02:42,479 [main] ERROR griffon.swing.SwingApplication - Unrecoverable error
      griffon.exceptions.MVCGroupConfigurationException: Unknown MVC type 'groovyScript'. Known types are [groovy-script]
      

      Editing griffon-app/conf/Applocation.groovy so that:

          startupGroups = ['groovyScript']
      

      becomes

          startupGroups = ['groovy-script']
      

      Makes the application work

      I've had a look into the code to see if I could come up with a patch, but I wasn't sure which way to go for the best...

      Inside griffon/subprojects/griffon-scripts/src/main/groovy/_GriffonCreateProject.groovy on the current master branch, there is the line:

              replacefilter(token: "@griffon.application.name@", value: GriffonNameUtils.getPropertyName(appClassName))
      

      My best guess is that this should be

              replacefilter(token: "@griffon.application.name@", value: griffonAppName)
      

      But I may be wrong

        Issue Links

          Activity

          Hide
          Tim Yates added a comment -

          Of course, I forgot the {code} tags and can't edit this issue to make it more readable...

          Sorry about that

          Show
          Tim Yates added a comment - Of course, I forgot the { code } tags and can't edit this issue to make it more readable... Sorry about that
          Hide
          Tim Yates added a comment -

          In addition to this, it splits into packages based on application name, ie:

          GroovyScriptView.groovy is in the package package groovy.script

          This is ok I believe as obviously hyphens aren't allowed in package names

          Show
          Tim Yates added a comment - In addition to this, it splits into packages based on application name, ie: GroovyScriptView.groovy is in the package package groovy.script This is ok I believe as obviously hyphens aren't allowed in package names
          Show
          Andres Almiray added a comment - Fixed with https://github.com/griffon/griffon/commit/58630154b268843d9608a551ebb03afa973dd545

            People

            • Assignee:
              Andres Almiray
              Reporter:
              Tim Yates
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: