You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by aj...@apache.org on 2005/07/10 15:27:03 UTC

svn commit: r210010 - /gump/trunk/python/gump/core/build/maven.py

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+']')



Re: svn commit: r210010 - /gump/trunk/python/gump/core/build/maven.py

Posted by Leo Simons <ma...@leosimons.com>.
ajack@apache.org wrote:
> 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:

              ^^^ there's an indentation error here.

I'll fix it in a moment.

- Leo

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org