I'm trying to get started with plovr using the simple "Hello World" example in Closure: The Definitive Guide by Michael Bolin. But my build produces an error. Can anyone out there enlighten me as to my mistake?
Here is my file layout:
C:\hello-plovr
├──hello-config.js
├──hello.js
└──plovr-0744c5209a34.jar
This is the contents of hello.js:
goog.provide( 'example' );
goog.require( 'goog.dom' ); // line 2
example.sayHello = function( message ) {
goog.dom.getElement( 'hello' ).innerHTML = message;
}
goog.exportSymbol( 'example.sayHello', example.sayHello );
And this is the contents of hello-config.js:
{
"id": "hello-plovr",
"inputs": "hello.js",
"paths": "."
}
Here are my build results (I threw in the Java version in case that matters):
C:\hello-plovr> java -jar plovr-0744c5209a34.jar build hello-config.js
JSC_MISSING_PROVIDE_ERROR. required "goog.dom" namespace never provided at hello.js line 2 : 12
BUILD FAILED: 1 Errors, 0 Warnings
I must be missing something trivial but I'm not seeing it.
In case it matters, this was run with Java 1.6.0_24:
C:\hello-plovr> java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)