You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/01/29 17:42:04 UTC

svn commit: r1065066 - /lucene/dev/nightly/common-maven.sh

Author: sarowe
Date: Sat Jan 29 16:42:04 2011
New Revision: 1065066

URL: http://svn.apache.org/viewvc?rev=1065066&view=rev
Log:
stop the strange copying of the maven local repo (it wasn't working anyway because since the target already existed it was going to a subdir of the target instead, so maven was still downloading the entire universe, and as a result the whole thing was growing with each save/restore...); also, one-time kill of the saved maven local repo

Modified:
    lucene/dev/nightly/common-maven.sh

Modified: lucene/dev/nightly/common-maven.sh
URL: http://svn.apache.org/viewvc/lucene/dev/nightly/common-maven.sh?rev=1065066&r1=1065065&r2=1065066&view=diff
==============================================================================
--- lucene/dev/nightly/common-maven.sh (original)
+++ lucene/dev/nightly/common-maven.sh Sat Jan 29 16:42:04 2011
@@ -7,6 +7,11 @@ mkdir -p $MAVEN_ARTIFACTS/org/apache
 
 cd $WORKSPACE/$ROOT_DIR
 
+###########################################################
+# TODO: remove the next line after it has executed once
+rm -rf $HOME/saved-maven-local-repo
+###########################################################
+
 echo ">>> Generating the Maven snapshot artifacts"
 $ANT_HOME/bin/ant \
   -Dsvnversion.exe=$SVNVERSION_EXE \
@@ -15,29 +20,15 @@ $ANT_HOME/bin/ant \
   generate-maven-artifacts
 echo ">>> Done generating the Maven snapshot artifacts"
 
-# Keep maven from downloading the entire universe
-SAVED_MAVEN_LOCAL_REPO=$HOME/saved-maven-local-repo
-if [ -d $SAVED_MAVEN_LOCAL_REPO ]; then
-	echo ">>> Restoring the saved Maven local repo"
-	# Add this when no longer done in hudson-settings.sh:
-    #	rm -rf $HOME/.m2/repository
-	cp -Rf $SAVED_MAVEN_LOCAL_REPO $HOME/.m2/repository
-	echo ">>> Done restoring the saved Maven local repo"
-else
-	echo ">>> No saved Maven local repo to restore"
-fi
+echo ">>> Removing Lucene/Solr artifacts from ~/.m2/repository/"
+rm -rf $HOME/.m2/repository/org/apache/lucene
+rm -rf $HOME/.m2/repository/org/apache/solr
+echo ">>> Done removing Lucene/Solr artifacts from ~/.m2/repository/"
 
 echo ">>> Installing non-mavenized deps into the maven local repo"
-$M2_HOME/bin/mvn -B -N -P bootstrap install
+$M2_HOME/bin/mvn --batch-mode --non-recursive -Pbootstrap install
 echo ">>> Done installing non-mavenized deps into the maven local repo"
 
 echo ">>> Running the Maven build"
 $M2_HOME/bin/mvn --batch-mode --fail-at-end clean install
 echo ">>> Done running the Maven build"
-
-echo ">>> Saving ~/.m2/repository/ to $SAVED_MAVEN_LOCAL_REPO"
-# Don't save output from "mvn clean install"
-rm -rf $HOME/.m2/repository/org/apache/lucene
-rm -rf $HOME/.m2/repository/org/apache/solr
-mv -f $HOME/.m2/repository $SAVED_MAVEN_LOCAL_REPO
-echo ">>> Done saving ~/.m2/repository/ to $SAVED_MAVEN_LOCAL_REPO"