searls/jasmine-maven-plugin — Issue #59: Using console.log causes maven build to fail
Author: marceloverdijk
Created: 2012-01-23 10:44:29+00:00
State: open

Take this javascript file

```
console.log('Welcome aboard!');

var HelloWorld = function() {
this.greeting = function() {
return "Hello, World";
}
}
```

while doing a new maven build the test phase fails because console is not defined.

```
[INFO] Executing Jasmine Specs
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.289s
[INFO] Finished at: Mon Jan 23 11:36:54 CET 2012
[INFO] Final Memory: 26M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:1.1.0:test (default) on project kapsalonreflection-app: The jasmine-maven-plugin encountered an exception:
[ERROR] java.lang.RuntimeException: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "console" is not defined.
```

I wonder how other people solved this?