FusionAuth/fusionauth-client-builder

Savant won't generate client code on Windows

rdvanbuuren opened this issue · 2 comments

I've setup Savant on Windows, but run into a problem when I try to generate the netcore client.
I've downloaded the compiled version of Savant from http://savant.inversoft.org/org/savantbuild/savant-core/1.0.0/savant-1.0.0.tar.gz and extracted it. So far so good. I've added the bin folder to my path. First problem I ran into was that the org.savantbuild.run.Main wasn't found. After some research I found out that it had to be org.savantbuild.runtime.Main. So after setting this up correctly I run into the following error, which I can't resolve:

Build failed due to an exception or error. freemarker.template.TemplateNotFoundException: Template not found for name "C:\\Projects\\fusionauth\\fusionauth-client-builder\\src\\main\\client\\netcore.client.ftl". The name was interpreted by this TemplateLoader: FileTemplateLoader(baseDir="C:\", canonicalBasePath="C:\"). Warning: The name contains backslash ("\") instead of slash ("/"); template names should use slash only. at freemarker.template.Configuration.getTemplate(Configuration.java:2797) at freemarker.template.Configuration.getTemplate(Configuration.java:2599) at freemarker.template.Configuration$getTemplate$3.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at com.inversoft.savant.plugin.clientLibrary.ClientLibraryPlugin.outputFile(ClientLibraryPlugin.groovy:101) at com.inversoft.savant.plugin.clientLibrary.ClientLibraryPlugin$outputFile$0.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:190) at com.inversoft.savant.plugin.clientLibrary.ClientLibraryPlugin.buildClient(ClientLibraryPlugin.groovy:97) at com.inversoft.savant.plugin.clientLibrary.ClientLibraryPlugin$buildClient.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at build$_run_closure13.doCall(build.savant:125) at build$_run_closure13.doCall(build.savant) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) at groovy.lang.Closure.call(Closure.java:426) at groovy.lang.Closure.call(Closure.java:420) at groovy.lang.Closure.run(Closure.java:507) at org.savantbuild.runtime.DefaultProjectRunner.runTarget(DefaultProjectRunner.java:95) at org.savantbuild.runtime.DefaultProjectRunner.lambda$run$5(DefaultProjectRunner.java:89) at java.util.ArrayList.forEach(Unknown Source) at org.savantbuild.runtime.DefaultProjectRunner.run(DefaultProjectRunner.java:72) at org.savantbuild.runtime.DefaultBuildRunner.run(DefaultBuildRunner.java:81) at org.savantbuild.runtime.Main.main(Main.java:81)

Any ideas on how to fix this issue?
Best regards,
Rick

For now, I can work around this issue using the Windows Linux Subsystem (WSL) with VS Code integration.

Thanks for the report, it looks like we are making some assumptions in our client builder Savant plugin.

Your work around is probably the best bet- I can look at fixing the plugin, but honestly it will be really low priority for us at the moment.

Thanks for your contributions!!