aboutsummaryrefslogtreecommitdiff
path: root/core/pom.xml
diff options
context:
space:
mode:
authorDhruve Ashar <dhruveashar@gmail.com>2016-06-06 09:42:50 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-06-06 09:42:50 -0700
commitfa4bc8ea8bab1277d1482da370dac79947cac719 (patch)
treeb71ec05ab5c47f58be5e0cc597d91dba31aa56cb /core/pom.xml
parent00ad4f054cd044e17d29b7c2c62efd8616462619 (diff)
downloadspark-fa4bc8ea8bab1277d1482da370dac79947cac719.tar.gz
spark-fa4bc8ea8bab1277d1482da370dac79947cac719.tar.bz2
spark-fa4bc8ea8bab1277d1482da370dac79947cac719.zip
[SPARK-14279][BUILD] Pick the spark version from pom
## What changes were proposed in this pull request? Change the way spark picks up version information. Also embed the build information to better identify the spark version running. More context can be found here : https://github.com/apache/spark/pull/12152 ## How was this patch tested? Ran the mvn and sbt builds to verify the version information was being displayed correctly on executing <code>spark-submit --version </code> ![image](https://cloud.githubusercontent.com/assets/7732317/15197251/f7c673a2-1795-11e6-8b2f-88f2a70cf1c1.png) Author: Dhruve Ashar <dhruveashar@gmail.com> Closes #13061 from dhruve/impr/SPARK-14279.
Diffstat (limited to 'core/pom.xml')
-rw-r--r--core/pom.xml31
1 files changed, 31 insertions, 0 deletions
diff --git a/core/pom.xml b/core/pom.xml
index 45f8bfcc05..f5fdb40696 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -337,9 +337,40 @@
<build>
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ </resource>
+ <resource>
+ <!-- Include the properties file to provide the build information. -->
+ <directory>${project.build.directory}/extra-resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <configuration>
+ <!-- Execute the shell script to generate the spark build information. -->
+ <tasks>
+ <exec executable="${project.basedir}/../build/spark-build-info">
+ <arg value="${project.build.directory}/extra-resources"/>
+ <arg value="${pom.version}"/>
+ </exec>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- When using SPARK_PREPEND_CLASSES Spark classes compiled locally don't use