Return-Path: Delivered-To: apmail-gump-commits-archive@www.apache.org Received: (qmail 37438 invoked from network); 10 Jul 2005 13:27:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jul 2005 13:27:05 -0000 Received: (qmail 38423 invoked by uid 500); 10 Jul 2005 13:27:05 -0000 Mailing-List: contact commits-help@gump.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@gump.apache.org Delivered-To: mailing list commits@gump.apache.org Received: (qmail 38410 invoked by uid 99); 10 Jul 2005 13:27:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2005 06:27:05 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 10 Jul 2005 06:27:04 -0700 Received: (qmail 37434 invoked by uid 65534); 10 Jul 2005 13:27:03 -0000 Message-ID: <20050710132703.37433.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r210010 - /gump/trunk/python/gump/core/build/maven.py Date: Sun, 10 Jul 2005 13:27:03 -0000 To: commits@gump.apache.org From: ajack@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ajack Date: Sun Jul 10 06:27:01 2005 New Revision: 210010 URL: http://svn.apache.org/viewcvs?rev=210010&view=rev Log: Attempt to cope with the Maven properties file going into a directory that does not yet exist. Modified: gump/trunk/python/gump/core/build/maven.py Modified: gump/trunk/python/gump/core/build/maven.py URL: http://svn.apache.org/viewcvs/gump/trunk/python/gump/core/build/maven.py?rev=210010&r1=210009&r2=210010&view=diff ============================================================================== --- gump/trunk/python/gump/core/build/maven.py (original) +++ gump/trunk/python/gump/core/build/maven.py Sun Jul 10 06:27:01 2005 @@ -187,9 +187,11 @@ os.path.basename(propertiesFile)) except: log.error('Display Properties [ ' + propertiesFile + '] Failed', exc_info=1) - - except: - log.error('Generate Maven Properties Failed', exc_info=1) + + except Exception, details: + message='Generate Maven Properties Failed:' + str(details) + log.error(message, exc_info=1) + project.addError(message) project.changeState(STATE_FAILED,REASON_PREBUILD_FAILED) # The propertiesFile parameter is primarily for testing. @@ -204,6 +206,12 @@ basedir = project.maven.getBaseDirectory() or project.getBaseDirectory() if not propertiesFile: propertiesFile=os.path.abspath(os.path.join(basedir,'build.properties')) + + # Ensure containing directory exists, or make it. + propsdir=os.path.dirname(propertiesFile) + if not os.path.exists(propsdir): + project.addInfo('Making directory for Maven properties: ['+propsdir+']') + os.makedirs(propsdir) if os.path.exists(propertiesFile): project.addWarning('Overriding Maven properties: ['+propertiesFile+']')