I'm following along on this page.
http://code.google.com/closure/templates/docs/helloworld_js.html
I get to the part where I need to execute this command.
c:\> java -jar SoyToJsSrcCompiler.jar --outputPathFormat simple.js
simple.soy
The output is:
C:\>java -jar SoyToJsSrcCompiler.jar --outputPathFormat simple.js
simple.soy
Exception in thread "main"
com.google.template.soy.base.SoySyntaxException: In file simple.soy:
Not all code is in Soy V
2 syntax (found file simple.soy not in Soy V2 syntax).
at
com.google.template.soy.soytree.SoytreeUtils.createSoySyntaxExceptionWithMetaInfo(Unknown
Source)
at
com.google.template.soy.sharedpasses.AssertSyntaxVersionV2Visitor.visitSoyNode(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitSoyFileNode(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(Unknown
Source)
at
com.google.template.soy.basetree.AbstractNodeVisitor.visitChildren(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitChildren(Unknown
Source)
at
com.google.template.soy.sharedpasses.AssertSyntaxVersionV2Visitor.visitSoyNode(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visitSoyFileSetNode(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(Unknown
Source)
at
com.google.template.soy.soytree.AbstractSoyNodeVisitor.visit(Unknown
Source)
at
com.google.template.soy.basetree.AbstractNodeVisitor.exec(Unknown
Source)
at
com.google.template.soy.soyparse.SoyFileSetParser.runCheckingPasses(Unknown
Source)
at
com.google.template.soy.soyparse.SoyFileSetParser.parseWithVersions(Unknown
Source)
at
com.google.template.soy.soyparse.SoyFileSetParser.parse(Unknown
Source)
at
com.google.template.soy.SoyFileSet.compileToJsSrcFiles(Unknown Source)
at com.google.template.soy.SoyToJsSrcCompiler.execMain(Unknown
Source)
at com.google.template.soy.SoyToJsSrcCompiler.main(Unknown
Source)
My simple.soy file looks like:
/**
* Says hello to the world.
*/
{template .helloWorld}
Hello world!
{/template}
I'm using a windows 7 environment if that matters. Though it seems
like the error is telling me that the simple.soy file is not correct
somehow. Any ideas on how I can get started with closure templates?