You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/10/23 04:44:07 UTC

git commit: [SPARK-3812] [BUILD] Adapt maven build to publish effective pom.

Repository: spark
Updated Branches:
  refs/heads/master 137d94235 -> c5882c663


[SPARK-3812] [BUILD] Adapt maven build to publish effective pom.

I have tried maven help plugin first but that published all projects in top level pom. So I was left with no choice but to roll my own trivial plugin. This patch basically installs an effective pom after maven install is finished.

The problem it fixes is described as follows:
If you install using maven
` mvn install -DskipTests -Dhadoop.version=2.2.0 -Phadoop-2.2 `
Then without this patch the published pom(s) will have hadoop version as 1.0.4. This can be a problem at some point.

Author: Prashant Sharma <pr...@imaginea.com>

Closes #2673 from ScrapCodes/build-changes-effective-pom and squashes the following commits:

aa7b91d [Prashant Sharma] used an unused dep.
0300dac [Prashant Sharma] improved comment messages..
28f891e [Prashant Sharma] Added a useless dependency, so that we can shade it. And realized fake shading works for us.
553d96b [Prashant Sharma] Shaded some unused class of an unused dep, to generate effective pom(s)


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

Branch: refs/heads/master
Commit: c5882c663e054adcd3ecd9f11e91a1929dbc14a3
Parents: 137d942
Author: Prashant Sharma <pr...@imaginea.com>
Authored: Wed Oct 22 19:44:00 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Wed Oct 22 19:44:00 2014 -0700

----------------------------------------------------------------------
 pom.xml | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c5882c66/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 288bbf1..687cc63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -248,7 +248,17 @@
       </snapshots>
     </pluginRepository>
   </pluginRepositories>
-
+  <!-- 
+       This is a dummy dependency that is used along with the shading plug-in
+       to create effective poms on publishing (see SPARK-3812).
+  -->
+  <dependencies>
+    <dependency>
+      <groupId>org.spark-project.spark</groupId>
+      <artifactId>unused</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+  </dependencies>
   <dependencyManagement>
     <dependencies>
       <dependency>
@@ -992,6 +1002,27 @@
     </pluginManagement>
 
     <plugins>
+      <!-- The shade plug-in is used here to create effective pom's (see SPARK-3812). -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadedArtifactAttached>false</shadedArtifactAttached>
+              <artifactSet>
+                <includes>
+                  <include>org.spark-project.spark:unused</include>
+                </includes>
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>


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