Repository: bahir
Updated Branches:
  refs/heads/master 91e82f42b -> 5e07303c6


[BAHIR-38] clean Ivy cache during Maven install phase

When we install the org.apache.bahir jars into the local
Maven repository we also need to clean the previous jar
files from the Ivy cache (~/iv2/cache/org.apache.bahir/*)
so spark-submit -packages ... will pick up the new version
from the the local Maven repository.

Closes #14


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

Branch: refs/heads/master
Commit: 5e07303c65e2c88cd392691bdfe9f68391f51b5c
Parents: 91e82f4
Author: Christian Kadner <[email protected]>
Authored: Tue Jul 26 20:37:22 2016 -0700
Committer: Luciano Resende <[email protected]>
Committed: Mon Aug 1 19:30:08 2016 +0300

----------------------------------------------------------------------
 pom.xml | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bahir/blob/5e07303c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0b429fb..f076801 100644
--- a/pom.xml
+++ b/pom.xml
@@ -944,6 +944,37 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <executions>
+          <!--
+            When we `install` the org.apache.bahir jars into the local Maven 
repository we also need
+            to clean the previous jar files from the Ivy cache 
(~/iv2/cache/org.apache.bahir/*) so
+            `spark-submit -packages ...` will pick up the new version from the 
the local Maven repository
+          -->
+          <execution>
+            <id>cleanup-ivy-cache</id>
+            <phase>install</phase>
+            <goals>
+              <goal>clean</goal>
+            </goals>
+            <configuration>
+              <followSymLinks>false</followSymLinks>
+              <excludeDefaultDirectories>true</excludeDefaultDirectories>
+              <filesets>
+                <fileset>
+                  
<directory>${user.home}/.ivy2/cache/${project.groupId}/${project.artifactId}</directory>
+                  <includes>
+                    <include>*-${project.version}.*</include>
+                    <include>jars/${project.build.finalName}.jar</include>
+                  </includes>
+                </fileset>
+              </filesets>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

Reply via email to