From 9a6ba7e2c538124f539b50512a7f95059f81cc16 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Tue, 5 Jan 2016 10:21:47 -0800 Subject: [SPARK-12643][BUILD] Set lib directory for antlr JIRA: https://issues.apache.org/jira/browse/SPARK-12643 Without setting lib directory for antlr, the updates of imported grammar files can not be detected. So SparkSqlParser.g will not be rebuilt automatically. Since it is a minor update, no JIRA ticket is opened. Let me know if it is needed. Thanks. Author: Liang-Chi Hsieh Closes #10571 from viirya/antlr-build. --- project/SparkBuild.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'project') diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 588e97f64e..af1d36c6ea 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -443,6 +443,10 @@ object Hive { val relGFilePath = (gFilePath relativeTo sourceDir).get.getPath log.info("ANTLR: Grammar file '%s' detected.".format(relGFilePath)) antlr.addGrammarFile(relGFilePath) + // We will set library directory multiple times here. However, only the + // last one has effect. Because the grammar files are located under the same directory, + // We assume there is only one library directory. + antlr.setLibDirectory(gFilePath.getParent) } // Generate the parser. -- cgit v1.2.3