|
|
Can't create Grails project
Windows 7 64-bit
STS build 2.5.2 upgraded to 2.6.0M1
I'm trying to create a Grails project (File--gt;New--gt; Grails project)
The wizard opens, where I fill in just the name quot;Blahquot;, hit quot;Finishquot;, and always get this error:
Command failed, see details for output.
------System.out:-----------Welcome to Grails 1.3.6 -
Licensed under Apache Standard License 2.0
Grails home is set to: C:\toos\\grails-1.3.6\
Base Directory: C:\Users\adelara\.workspace-sts
Resolving dependencies...
Dependencies resolved in 937ms.
Running script C:\toos\\grails-1.3.6\scripts\CreateApp_.groovy
Error executing script CreateApp: String index out of range: 1
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.substring(Unknown Source)
at grails.util.GrailsNameUtils.getClassNameRepresenta tion(GrailsNameUtils.java:89)
~~~~~~ snipped out ~~~~~~~~
at CreateApp_.run(CreateApp_:25)
at CreateApp_$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:606)
Error executing script CreateApp: String index out of range: 1
// =========================================
Gaaahhhhh ... got it ! It was unable to create the folder under my quot;C:\Users\adelara\.workspace-stsquot; (note the dot)
but when I told it to use c:\tmp it was happy
I'm guessing that not too many people create their projects under a '.' folder. So this is likely a bug that hasn't been reported before.
Could be a bug in STS grails support, or (in this case more likely given the stuff you posted above) a bug in Grails itself.
I'll look into it a little bit and create a bug report in the appropriate Jira tracker.
Thanks for posting this on the forum.
Kris
This is most definitely a problem with Grails itself. I get the exact same problem trying to create an app from the commandline, inside a folder starting with a '.'.
I'll raise a Jira with Grails.
Jira issue raised
browse/GRAILS-7280
Kris
Thank you Kris.
You are right: not everyone creates a workspace starting with a quot;dotquot; - it was my way to differentiate from my regular workspace. It's an issue indeed, but it can be downgraded to quot;minor-quot;.
-Alex |
|