gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r210010 - /gump/trunk/python/gump/core/build/maven.py
Date Sun, 10 Jul 2005 13:27:03 GMT
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+']')



Mime
View raw message