Reputation: 672
Our source code uses the closure compiler to minify javascript. Recently I was tasked with upgrading it to the latest version. When I did, the javascript component would no longer compile properly. The version we used previously was v20131014. I tried the latest (from February, 2016) as well as the 3 or 4 versions just before that, but all with the same problems.
The way we use the compiler is from the command line, within a Groovy file that does a bunch of transpiling of JavaScript:
...
def command = "java -jar $compiler --js $orderedDependencies --js_output_file $minFilename --create_source_map $mapFilename --compilation_level WHITESPACE_ONLY --source_map_format=V3 "
command.execute(null as List, outputDir).waitFor()
....
When I run this script it hangs on the execution. When I run the command on the command line (with actual values replacing the variables you see above), it works fine with no problems. There are no log messages from the build that indicate what's wrong; and Version v20131014 works no problem.
Any ideas what may have changed between 2013 and 2016 that could cause this problem?
Upvotes: 1
Views: 92
Reputation: 171144
It probably writes more output, so is blocking the one of the standard input pipes
You should do something with the output.
This will print it to the console
command.execute(null as List, outputDir)
.waitForProcessOutput(System.out, System.err)
Upvotes: 1