aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorShixiong Zhu <shixiong@databricks.com>2016-10-05 18:11:31 -0700
committerTathagata Das <tathagata.das1565@gmail.com>2016-10-05 18:11:31 -0700
commitb678e465afa417780b54db0fbbaa311621311f15 (patch)
treee8276a329b9b150b8de7f2d5ef7122988d202331 /sql
parent9293734d35eb3d6e4fd4ebb86f54dd5d3a35e6db (diff)
downloadspark-b678e465afa417780b54db0fbbaa311621311f15.tar.gz
spark-b678e465afa417780b54db0fbbaa311621311f15.tar.bz2
spark-b678e465afa417780b54db0fbbaa311621311f15.zip
[SPARK-17346][SQL][TEST-MAVEN] Generate the sql test jar to fix the maven build
## What changes were proposed in this pull request? Generate the sql test jar to fix the maven build ## How was this patch tested? Jenkins Author: Shixiong Zhu <shixiong@databricks.com> Closes #15368 from zsxwing/sql-test-jar.
Diffstat (limited to 'sql')
-rw-r--r--sql/core/pom.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/core/pom.xml b/sql/core/pom.xml
index 84de1d4a6e..7da77158ff 100644
--- a/sql/core/pom.xml
+++ b/sql/core/pom.xml
@@ -132,6 +132,33 @@
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
<plugins>
+ <!--
+ This plugin forces the generation of jar containing sql test classes,
+ so that the tests classes of external modules can use them. The two execution profiles
+ are necessary - first one for 'mvn package', second one for 'mvn test-compile'. Ideally,
+ 'mvn compile' should not compile test classes and therefore should not need this.
+ However, an open Maven bug (http://jira.codehaus.org/browse/MNG-3559)
+ causes the compilation to fail if catalyst test-jar is not generated. Hence, the
+ second execution profile for 'mvn test-compile'.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>test-jar-on-test-compile</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>