Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 99829 invoked from network); 29 Aug 2006 21:47:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Aug 2006 21:47:38 -0000 Received: (qmail 29542 invoked by uid 500); 29 Aug 2006 21:47:36 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 29461 invoked by uid 500); 29 Aug 2006 21:47:36 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 29450 invoked by uid 500); 29 Aug 2006 21:47:36 -0000 Received: (qmail 29447 invoked by uid 99); 29 Aug 2006 21:47:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 14:47:36 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 14:47:34 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C8C9C1A981A; Tue, 29 Aug 2006 14:47:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r438239 - /jakarta/commons/proper/commons-build/trunk/commons_nightly.sh Date: Tue, 29 Aug 2006 21:47:13 -0000 To: commons-cvs@jakarta.apache.org From: psteitz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060829214713.C8C9C1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: psteitz Date: Tue Aug 29 14:47:13 2006 New Revision: 438239 URL: http://svn.apache.org/viewvc?rev=438239&view=rev Log: Added maven 2 support. Modified: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh Modified: jakarta/commons/proper/commons-build/trunk/commons_nightly.sh URL: http://svn.apache.org/viewvc/jakarta/commons/proper/commons-build/trunk/commons_nightly.sh?rev=438239&r1=438238&r2=438239&view=diff ============================================================================== --- jakarta/commons/proper/commons-build/trunk/commons_nightly.sh (original) +++ jakarta/commons/proper/commons-build/trunk/commons_nightly.sh Tue Aug 29 14:47:13 2006 @@ -3,19 +3,23 @@ # Jakarta Commons Nightly Build # # Executes "svn up" and then "ant clean dist" for all of the -# components in $nightly_list_location/nightly_proper_ant_list.txt -# and "maven clean dist" for those in -# $nightly_list_location/nightly_proper_maven_list.txt. +# components in $nightly_list_location/nightly_proper_ant_list.txt, +# "maven clean dist" for those in +# $nightly_list_location/nightly_proper_maven_list.txt and +# mvn assembly:assembly -DdescriptorId=bin (then src) for components in +# $nightly_list_location/nightly_proper_maven2_list.txt # Similarly for sandbox components from the *_sandbox_* lists. # # Uses scp to upload resulting .zip and .tar.gz files to # $deploy_user@$deploy_host:$deploy_location/commons-$component # -# Deploys dated snapshot jars for the maven components to -# $maven_snapshot_host:$maven_snapshot_directory +# Deploys dated snapshot jars for the maven 1 components to +# $maven_snapshot_host:$maven_snapshot_directory and uses +# "mvn deploy" to deploy maven 2 jars to the snapshot repo configured +# in the pom. # # Names of distro files take the form -# commons-$component-src-$time_stamp (source) +# commons-$component-$time_stamp-src (source) # commons-$component-$time_stamp (binaries) # # (Over-)writes a log for each component build to $log_location/$component.log @@ -45,22 +49,31 @@ log_url=http://people.apache.org/~psteitz/commons-nightlies notification_email=commons-dev@jakarta.apache.org #============================================================================== +# Function definitions +#============================================================================== +# Check to make sure current component checkout exists locally and if it is +# missing, execute "svn up" from the current root +#============================================================================== +verify_checkout() { + if [ ! -e "${current_root}/${component}" ] # Check if checkout exists. + then + echo "$component checkout is missing." + echo "Updating top level checkout..." + cd $current_root + svn up + fi +} +#============================================================================== # Process maven components in $components list. # Assumes $components are checked out with common root, $current_root #============================================================================== process_maven_components() { for component in $components do - if [ ! -e "${current_root}/${component}" ] # Check if checkout exists. - then - echo "$component checkout is missing." - echo "Updating top level checkout..." - cd $current_root - svn up - fi + verify_checkout cd ${current_root}/${component} echo - echo "Using Maven to build $component...." + echo "Using Maven 1 to build $component...." svn up # Create distro, overriding version name with timestamp @@ -113,19 +126,61 @@ done } #============================================================================== +# Process maven 2 components in $components list. +# Assumes $components are checked out with common root, $current_root +#============================================================================== +process_maven2_components() { + for component in $components + do + verify_checkout + cd ${current_root}/${component} + echo + echo "Using Maven 2 to build $component...." + svn up + + # Create source and binary distributions + mvn clean + mvn assembly:assembly -DdescriptorId=bin > $log_location/$component.log 2>&1 + mvn assembly:assembly -DdescriptorId=src + # Rename files + mv target/commons-$component*bin.tar.gz target/commons-$component-$time_stamp.tar.gz + mv target/commons-$component*src.tar.gz target/commons-$component-$time_stamp-src.tar.gz + mv target/commons-$component*bin.zip target/commons-$component-$time_stamp.zip + mv target/commons-$component*src.zip target/commons-$component-$time_stamp-src.zip + + # Deploy source and binary distro to commons nightly location + ssh $deploy_host mkdir -p $deploy_location/commons-$component + scp target/distributions/commons-$component*.gz \ + $deploy_user@$deploy_host:$deploy_location/commons-$component + scp target/distributions/commons-$component*.zip \ + $deploy_user@$deploy_host:$deploy_location/commons-$component + scp target/distributions/commons-$component*.md5 \ + $deploy_user@$deploy_host:$deploy_location/commons-$component + + # Deploy dated jar to maven 2 snapshot repo (configured in apache pom) + if [ -e "target/commons-$component*.jar" ] # build succeeded + then + mvn deploy + else # build failed - add to failure list and capture unit test logs + failed_builds[${#failed_builds[@]}]=$component + echo "Test Reports" >> $log_location/$component.log + for i in "target/surefire-reports/*.txt"; do + cat $i >> $log_location/$component.log + done + fi + + # Cleanup + rm -rf target + done +} +#============================================================================== # Process ant components in $components list. # Assumes $components are checked out with common root, $current_root #============================================================================== process_ant_components() { for component in $components do - if [ ! -e "${current_root}/${component}" ] # Check if checkout exists. - then - echo "$component checkout is missing." - echo "Updating top level checkout..." - cd $current_root - svn up - fi + verify_checkout cd ${current_root}/${component} echo echo "Using Ant to build $component...." @@ -171,13 +226,23 @@ rm -rf ${ant_build}/commons-$component-src done } - +#============================================================================== +# Main +#============================================================================== echo "Commons nightly build starting: `date`" # Update commons-build cd $proper_root/commons-build svn up +# Update and install commons m2 poms - drop this when they are released +cd $proper_root +svn up pom.xml +mvn -N install +cd $sandbox_root +svn up pom.xml +mvn -N install + # Set umask umask 002 @@ -200,6 +265,16 @@ echo "==========================================" process_maven_components +# Proper Maven 2 components +list_file="$nightly_list_location/nightly_proper_maven2_list.txt" +components=`<$list_file` +current_root=$proper_root +echo +echo "==========================================" +echo "Building Commons Proper Maven 2 Components" +echo "==========================================" +process_maven2_components + # Sandbox Ant components list_file="$nightly_list_location/nightly_sandbox_ant_list.txt" components=`<$list_file` @@ -220,8 +295,21 @@ echo "==========================================" process_maven_components -# Make files group writable +# Sandbox Maven 2 components +list_file="$nightly_list_location/nightly_sandbox_maven2_list.txt" +components=`<$list_file` +current_root=$sandbox_root +echo +echo "==========================================" +echo " Building Sandbox Maven 2 Components " +echo "==========================================" +process_maven2_components + +# Make tar/zip files group writable ssh $deploy_host chmod -R g+w $deploy_location + +# Workaround m2 deploy bug - should be able to drop this soon +ssh $deploy_host /www/people.apache.org/repo/m2-snapshot-repository/fix-permissions.sh # Send failure notification email if there are build failures if [ ${#failed_builds[@]} -gt 0 ] --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org