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/27 08:08:13 UTC

svn commit: r1064010 - in /lucene/dev/nightly: hudson-lucene-solr-maven-3.x.sh hudson-lucene-solr-maven-trunk.sh

Author: sarowe
Date: Thu Jan 27 07:08:13 2011
New Revision: 1064010

URL: http://svn.apache.org/viewvc?rev=1064010&view=rev
Log:
initial version of new hudson build scripts

Added:
    lucene/dev/nightly/hudson-lucene-solr-maven-3.x.sh   (with props)
    lucene/dev/nightly/hudson-lucene-solr-maven-trunk.sh   (with props)

Added: lucene/dev/nightly/hudson-lucene-solr-maven-3.x.sh
URL: http://svn.apache.org/viewvc/lucene/dev/nightly/hudson-lucene-solr-maven-3.x.sh?rev=1064010&view=auto
==============================================================================
--- lucene/dev/nightly/hudson-lucene-solr-maven-3.x.sh (added)
+++ lucene/dev/nightly/hudson-lucene-solr-maven-3.x.sh Thu Jan 27 07:08:13 2011
@@ -0,0 +1,58 @@
+#!/bin/sh
+. $WORKSPACE/nightly/hudson-settings.sh
+
+#Update the Version # when doing a release
+MAVEN_ARTIFACT_VERSION=3.1-SNAPSHOT
+
+export JAVA_HOME=$JAVA_HOME_15
+export M2_HOME=$HOME/tools/maven/latest2
+SAVED_MAVEN_LOCAL_REPO=$HOME/saved-maven-local-repo
+
+mkdir -p $MAVEN_ARTIFACTS/org/apache
+
+cd $WORKSPACE/$ROOT_DIR
+
+# Keep maven from downloading the entire universe
+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 ">>> Getting the Maven POMs"
+$ANT_HOME/bin/ant -Dversion=$MAVEN_ARTIFACT_VERSION get-maven-poms
+echo ">>> Done getting the Maven POMs"
+
+echo ">>> Installing non-mavenized deps into the maven local repo"
+$M2_HOME/bin/mvn -N -P bootstrap install
+echo ">>> Done installing non-mavenized deps into the maven local repo"
+
+echo ">>> Running the Maven build"
+$M2_HOME/bin/mvn 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"
+
+echo ">>> Generating the Maven snapshot artifacts"
+$ANT_HOME/bin/ant \
+  -Dsvnversion.exe=$SVNVERSION_EXE \
+  -Dsvn.exe=$SVN_EXE \
+  -Dversion=$MAVEN_ARTIFACT_VERSION \
+  clean generate-maven-artifacts
+echo ">>> Done generating the Maven snapshot artifacts"
+
+echo ">>> Moving Maven artifacts to $MAVEN_ARTIFACTS"
+mv -f $WORKSPACE/$CORE_DIR/dist/maven/org/apache/lucene \
+      $MAVEN_ARTIFACTS/org/apache
+mv -f $WORKSPACE/$SOLR_DIR/dist/maven/org/apache/solr \
+      $MAVEN_ARTIFACTS/org/apache
+echo ">>> Done moving Maven Artifacts"

Added: lucene/dev/nightly/hudson-lucene-solr-maven-trunk.sh
URL: http://svn.apache.org/viewvc/lucene/dev/nightly/hudson-lucene-solr-maven-trunk.sh?rev=1064010&view=auto
==============================================================================
--- lucene/dev/nightly/hudson-lucene-solr-maven-trunk.sh (added)
+++ lucene/dev/nightly/hudson-lucene-solr-maven-trunk.sh Thu Jan 27 07:08:13 2011
@@ -0,0 +1,56 @@
+#!/bin/sh
+. $WORKSPACE/nightly/hudson-settings.sh
+
+#Update the Version # when doing a release
+MAVEN_ARTIFACT_VERSION=4.0-SNAPSHOT
+
+export JAVA_HOME=$JAVA_HOME_16
+export M2_HOME=$HOME/tools/maven/latest2
+SAVED_MAVEN_LOCAL_REPO=$HOME/saved-maven-local-repo
+
+mkdir -p $MAVEN_ARTIFACTS/org/apache
+
+cd $WORKSPACE/$ROOT_DIR
+
+# Keep maven from downloading the entire universe
+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 ">>> Getting the Maven POMs"
+$ANT_HOME/bin/ant -Dversion=$MAVEN_ARTIFACT_VERSION get-maven-poms
+echo ">>> Done getting the Maven POMs"
+
+echo ">>> Installing non-mavenized deps into the maven local repo"
+$M2_HOME/bin/mvn -N -P bootstrap install
+echo ">>> Done installing non-mavenized deps into the maven local repo"
+
+echo ">>> Running the Maven build"
+$M2_HOME/bin/mvn 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"
+
+echo ">>> Generating the Maven snapshot artifacts"
+$ANT_HOME/bin/ant \
+  -Dsvnversion.exe=$SVNVERSION_EXE \
+  -Dsvn.exe=$SVN_EXE \
+  -Dversion=$MAVEN_ARTIFACT_VERSION \
+  clean generate-maven-artifacts
+echo ">>> Done generating the Maven snapshot artifacts"
+
+echo ">>> Moving Maven artifacts to $MAVEN_ARTIFACTS"
+mv -f $WORKSPACE/$ROOT_DIR/dist/maven/org/apache/* \
+      $MAVEN_ARTIFACTS/org/apache
+echo ">>> Done moving Maven Artifacts"



RE: svn commit: r1064010 - in /lucene/dev/nightly: hudson-lucene-solr-maven-3.x.sh hudson-lucene-solr-maven-trunk.sh

Posted by Steven A Rowe <sa...@syr.edu>.
Agreed, I'll get rid of the "strange" copying after the other build scripts are changed to not delete the repo.  I want to wait until these Maven builds are stable though.

I agree the maven env vars should be centralized.

Current problem though is failing Groovy code in the grandparent pom that I haven't seen locally.

Steve

> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Thursday, January 27, 2011 3:13 AM
> To: dev@lucene.apache.org
> Subject: RE: svn commit: r1064010 - in /lucene/dev/nightly: hudson-lucene-
> solr-maven-3.x.sh hudson-lucene-solr-maven-trunk.sh
> 
> Hi Steven,
> 
> > +# Keep maven from downloading the entire universe 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
> 
> Do don't need to do this strange copying all the time, would it be not
> easier to modify hudson_settings.sh and only delete o.a.lucene/solr from
> the local repository? Deleting everything was just a quick hack.
> 
> Also the other env vars to maven would also be good in hudson_settings.sh.
> 
> Uwe
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org


RE: svn commit: r1064010 - in /lucene/dev/nightly: hudson-lucene-solr-maven-3.x.sh hudson-lucene-solr-maven-trunk.sh

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi Steven,

> +# Keep maven from downloading the entire universe 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

Do don't need to do this strange copying all the time, would it be not easier to modify hudson_settings.sh and only delete o.a.lucene/solr from the local repository? Deleting everything was just a quick hack.

Also the other env vars to maven would also be good in hudson_settings.sh.

Uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org