You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2016/04/27 00:14:24 UTC

spark git commit: [SPARK-14925][BUILD] Re-introduce 'unused' dependency so that published POMs are flattened

Repository: spark
Updated Branches:
  refs/heads/master 9797cc20c -> 75879ac3c


[SPARK-14925][BUILD] Re-introduce 'unused' dependency so that published POMs are flattened

Spark's published POMs are supposed to be flattened and not contain variable substitution (see SPARK-3812), but the dummy dependency that was required for this was accidentally removed. We should re-introduce this dependency in order to fix an issue where the un-flattened POMs cause the wrong dependencies to be included in Scala 2.10 published POMs.

Author: Josh Rosen <jo...@databricks.com>

Closes #12706 from JoshRosen/SPARK-14925-published-poms-should-be-flattened.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/75879ac3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/75879ac3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/75879ac3

Branch: refs/heads/master
Commit: 75879ac3c07f3b1a708f4392429335feb06f271b
Parents: 9797cc2
Author: Josh Rosen <jo...@databricks.com>
Authored: Tue Apr 26 15:14:17 2016 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Tue Apr 26 15:14:17 2016 -0700

----------------------------------------------------------------------
 assembly/pom.xml |  7 +++++++
 examples/pom.xml |  7 +++++++
 pom.xml          | 17 +++++++++++++++++
 3 files changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/75879ac3/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 22cbac0..75ac926 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -38,6 +38,13 @@
   </properties>
 
   <dependencies>
+    <!-- Prevent our dummy JAR from being included in Spark distributions or uploaded to YARN -->
+    <dependency>
+      <groupId>org.spark-project.spark</groupId>
+      <artifactId>unused</artifactId>
+      <version>1.0.0</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-core_${scala.binary.version}</artifactId>

http://git-wip-us.apache.org/repos/asf/spark/blob/75879ac3/examples/pom.xml
----------------------------------------------------------------------
diff --git a/examples/pom.xml b/examples/pom.xml
index 43f3d2e..4423d0f 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -42,6 +42,13 @@
   </properties>
 
   <dependencies>
+    <!-- Prevent our dummy JAR from being included in Spark distributions or uploaded to YARN -->
+    <dependency>
+      <groupId>org.spark-project.spark</groupId>
+      <artifactId>unused</artifactId>
+      <version>1.0.0</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-core_${scala.binary.version}</artifactId>

http://git-wip-us.apache.org/repos/asf/spark/blob/75879ac3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d3a69df..34c374d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -245,6 +245,22 @@
   </pluginRepositories>
   <dependencies>
     <!--
+      This is a dummy dependency that is used to trigger the maven-shade plugin so that Spark's
+      published POMs are flattened and do not contain variables. Without this dependency, some
+      subprojects' published POMs would contain variables like ${scala.binary.version} that will
+      be substituted according to the default properties instead of the ones determined by the
+      profiles that were active during publishing, causing the Scala 2.10 build's POMs to have 2.11
+      dependencies due to the incorrect substitutions. By ensuring that maven-shade runs for all
+      subprojects, we eliminate this problem because the substitutions are baked into the final POM.
+
+      For more details, see SPARK-3812 and MNG-2971.
+    -->
+    <dependency>
+      <groupId>org.spark-project.spark</groupId>
+      <artifactId>unused</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <!--
          This is needed by the scalatest plugin, and so is declared here to be available in
          all child modules, just as scalatest is run in all children
     -->
@@ -2195,6 +2211,7 @@
           <shadedArtifactAttached>false</shadedArtifactAttached>
           <artifactSet>
             <includes>
+              <include>org.spark-project.spark:unused</include>
               <include>org.eclipse.jetty:jetty-io</include>
               <include>org.eclipse.jetty:jetty-http</include>
               <include>org.eclipse.jetty:jetty-continuation</include>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org