grails-angular-scaffolding
grails-angular-scaffolding copied to clipboard
Plugin not working with Grails 2.3
Probably because plugin support evolved in the last release, I have the following error whan running scaffolding:
| Error Error running script ng-generate-all com.tb.app.Requestmap --stacktrace: startup failed: _NgGenerate_groovy: 60: unable to resolve class DefaultGrailsTemplateGenerator @ line 60, column 1. 1 error (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: _NgGenerate_groovy: 60: unable to resolve class DefaultGrailsTemplateGenerator @ line 60, column 1. 1 error
at gant.Gant.compileScript(Gant.groovy:631)
at gant.Gant.this$2$compileScript(Gant.groovy)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
at gant.Gant$_closure1.doCall(Gant.groovy:129)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:57)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at NgGenerateAll.run(NgGenerateAll:1)
at NgGenerateAll$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:607)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
@tbarnier I have the same exception. Any thoughts how to resolve it?
I tried to add a "dependsOn" into the plugin on the scaffolding plugins.. didn't work. As I was in a hurry, I inlined the angular plugin into my root project... and it worked
Cheers
I ran 'grails compile' and managed to get past the above error but now it fails with:
| Error Error executing script NgGenerateAll: startup failed: _NgGenerate_groovy: 115: The return type of java.lang.Object getTemplateNames() in AngularTemplateGenerator is incompatible with java.util.Set getTemplateNames() in org.codehaus.groovy.grails.scaffolding.AbstractGrailsTemplateGenerator . At [115:2] @ line 115, column 2.
I also get the error on line 60 and guessing from what I see - the problem appears to be that class DefaultGrailsTemplateGenerator is not in the 2.3.1 API doc. Strange because I also saw a recent update by Graeme in the scaffolding plugin that contained an import for that class.
From the looks of the log below, it really just looks like you had problems getting the plugin downloaded and included by maven. Maybe you can download the plugin from GitHub and install it locally? There is an unresolved problem with the plugin due to the fact that the scaffolding code because a plugin recently (2.2 or 2.3) and the plugin has not be recompiled with changed dependencies, but that doesn't appear to be your problem from the log below. Date: Thu, 5 Dec 2013 23:17:13 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [grails-angular-scaffolding] Plugin not working with Grails 2.3 (#32)
I was trying to use with Grails 2.3.4 , by command line ( grails install-plugin angular-scaffolding) but it not allows by Grails asking to install by adding compile ":angular-scaffolding:1.0-SNAPSHOT" in to BuildConfig.groovy.
When I added it to BuildConfig.groovy and Clicked on "Apply Grails changes to IDEA project structure" button the error has occurred
"C:\Program Files\Java\jdk1.7.0_45\bin\java" -Dgrails.home=D:\sdk-lib2\grails-2.3.4 "-Dbase.dir=C:\Users\Algo 2\IdeaProjects\angular-grails-2" "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar" -Dgroovy.starter.conf=D:\sdk-lib2\grails-2.3.4/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -Dfile.encoding=UTF-8 -classpath D:\sdk-lib2\grails-2.3.4\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.1.9.jar;D:\sdk-lib2\grails-2.3.4\dist\grails-bootstrap-2.3.4.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf D:\sdk-lib2\grails-2.3.4/conf/groovy-starter.conf idea-print-project-settings|Loading Grails 2.3.4
|Configuring classpath
|Downloading: org/grails/plugins/angular-scaffolding/1.0-SNAPSHOT/maven-metadata.xml
|Downloading: org/grails/plugins/angular-scaffolding/1.0-SNAPSHOT/angular-scaffolding-1.0-20120928.214204-5.pom
|Downloading: org/grails/plugins/angular-scaffolding/1.0-SNAPSHOT/angular-scaffolding-1.0-20120928.214204-5.zip
Error |
Resolve error obtaining dependencies: Could not transfer artifact org.grails.plugins:angular-scaffolding:zip:1.0-20120928.214204-5 from/to grailsCentral (http://repo.grails.org/grails/plugins): Premature end of Content-Length delimited message body (expected: 168283; received: 46121 (Use --stacktrace to see the full trace)
Error |
Could not transfer artifact org.grails.plugins:angular-scaffolding:zip:1.0-20120928.214204-5 from/to grailsCentral (http://repo.grails.org/grails/plugins): Premature end of Content-Length delimited message body (expected: 168283; received: 46121
|Run 'grails dependency-report' for further information.
— Reply to this email directly or view it on GitHub.
Hi everyone,
I try your plugin. The sample works pretty fine for me. I'm working on Mac OSX using grails 2.3.4. There is a problem when I want to create an Album. Create button seem to not work. I try to find the problem and I come back to you.
- However, When I create a grails project and add < compile ":angular-scaffolding:1.0-SNAPSHOT" > the plugin was not found. If I clone your plugin and run the sample its working well.
- Using your sample. If I add a new simple domain class and run from the command line "grails ng-generate-all myDomainClassName" or "grails ng-generate-views myDomainClassName" I have got this error :
I/O exception loading script [scaffoldingPluginDir/scripts/_GrailsGenerate.groovy (No such file or directory)]: scaffoldingPluginDir/scripts/_GrailsGenerate.groovy (No such file or directory)
Have you any idea how to fix it ? Any news from previous comments ? It seems to be the same problems.
Thks,
Hi lduparc, I bumped into the same issue: with
I/O exception loading script [scaffoldingPluginDir/scripts/_GrailsGenerate.groovy (No such file or directory)]: scaffoldingPluginDir/scripts/_GrailsGenerate.groovy (No such file or directory)
The fix for this is simple: in the _NgGenerate.groovy file, replace includeTargets << new File("scaffoldingPluginDir/scripts/_GrailsGenerate.groovy") with includeTargets << new File("$scaffoldingPluginDir/scripts/_GrailsGenerate.groovy")
The grails scaffolding plugin directory is a variable, hence the required dollar sign. Cheers,
Stephan
Not work in my env. includeTargets << new File("$scaffoldingPluginDir/scripts/_GrailsGenerate.groovy") Work! includeTargets << new File("${scaffoldingPluginDir}/scripts/_GrailsGenerate.groovy")