lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1067978 - /lucene/dev/nightly/common-maven.sh
Date Mon, 07 Feb 2011 15:40:14 GMT
Author: sarowe
Date: Mon Feb  7 15:40:14 2011
New Revision: 1067978

URL: http://svn.apache.org/viewvc?rev=1067978&view=rev
Log:
always use the latest java 1.6 to run tests under maven; always generate maven artifacts for
lucene/ and modules/ using the latest java 1.5

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=1067978&r1=1067977&r2=1067978&view=diff
==============================================================================
--- lucene/dev/nightly/common-maven.sh (original)
+++ lucene/dev/nightly/common-maven.sh Mon Feb  7 15:40:14 2011
@@ -9,25 +9,38 @@ rm -rf $HOME/.m2/repository/org/apache/l
 rm -rf $HOME/.m2/repository/org/apache/solr
 echo ">>> Done removing Lucene/Solr artifacts from ~/.m2/repository/"
 
-cd $WORKSPACE/$ROOT_DIR
-
-echo ">>> Generating the Maven snapshot artifacts"
-$ANT_HOME/bin/ant \
-  -Dsvnversion.exe=$SVNVERSION_EXE \
-  -Dsvn.exe=$SVN_EXE \
-  -Dversion=$MAVEN_ARTIFACT_VERSION \
-  generate-maven-artifacts
-echo ">>> Done generating the Maven snapshot artifacts"
+ARTIFACT_GENERATION_JAVA_HOME=$JAVA_HOME_15
+for TopLevelDir in lucene modules solr ; do
+    # There is no modules/ dir in branch_3x
+    if [ -d $WORKSPACE/$ROOT_DIR/$TopLevelDir ] ; then
+        if [ "$TopLevelDir" = "solr" ]; then
+            ARTIFACT_GENERATION_JAVA_HOME=$JAVA_HOME_16
+        fi
+        cd $WORKSPACE/$ROOT_DIR/$TopLevelDir
+        echo ">>> Generating the Maven snapshot artifacts"
+        JAVA_HOME=$ARTIFACT_GENERATION_JAVA_HOME $ANT_HOME/bin/ant \
+            -Dsvnversion.exe=$SVNVERSION_EXE \
+            -Dsvn.exe=$SVN_EXE \
+            -Dversion=$MAVEN_ARTIFACT_VERSION \
+            generate-maven-artifacts
+        echo ">>> Done generating the Maven snapshot artifacts"
+    fi
+done
 
 echo ">>> Installing non-mavenized deps into the maven local repo"
 $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 ">>> Running the Maven build without tests"
+$M2_HOME/bin/mvn --batch-mode --fail-at-end -DskipTests install
+echo ">>> Done running the Maven build without tests"
+
+echo ">>> Running tests under Maven"
+# Always use Java 1.6 to run tests - fewer bugs than 1.5
+JAVA_HOME=$JAVA_HOME_16 $M2_HOME/bin/mvn --batch-mode --fail-at-end test
+echo ">>> Done running tests under Maven"
 
-echo ">>> Moving Maven artifacts to $MAVEN_ARTIFACTS"
+echo ">>> Copying Maven artifacts to $MAVEN_ARTIFACTS"
 mkdir -p $MAVEN_ARTIFACTS
-mv -f $WORKSPACE/$ROOT_DIR/dist/maven/* $MAVEN_ARTIFACTS/
-echo ">>> Done moving Maven Artifacts"
+cp -R $WORKSPACE/$ROOT_DIR/*/dist/maven/* $MAVEN_ARTIFACTS/
+echo ">>> Done copying Maven artifacts"



Mime
View raw message