gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r210156 - in /gump/branches/Gump3: metadata/vmgump.xml pygump/python/gump/config.py pygump/python/gump/engine/objectifier.py pygump/python/gump/plugins/java/builder.py
Date Mon, 11 Jul 2005 17:02:09 GMT
Author: leosimons
Date: Mon Jul 11 10:02:07 2005
New Revision: 210156

URL: http://svn.apache.org/viewcvs?rev=210156&view=rev
Log:
Start on implementing <property, fix bug with @@DATE@@

Modified:
    gump/branches/Gump3/metadata/vmgump.xml
    gump/branches/Gump3/pygump/python/gump/config.py
    gump/branches/Gump3/pygump/python/gump/engine/objectifier.py
    gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py

Modified: gump/branches/Gump3/metadata/vmgump.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/metadata/vmgump.xml?rev=210156&r1=210155&r2=210156&view=diff
==============================================================================
--- gump/branches/Gump3/metadata/vmgump.xml (original)
+++ gump/branches/Gump3/metadata/vmgump.xml Mon Jul 11 10:02:07 2005
@@ -322,12 +322,12 @@
         
         <!-- commands -->
         <ant target="jar">
-            <!-- TODO <property name="version" value="@@DATE@@"/>-->
+            <property name="version" value="@@DATE@@"/>
         </ant>
         
         <!-- ouputs -->
         <home nested="build"/>
-        <!-- TODO <jar name="jakarta-regexp-@@DATE@@.jar" id="regexp"/>-->
+        <jar name="jakarta-regexp-@@DATE@@.jar" id="regexp"/>
         <jar name="jakarta-regexp-1.4-dev.jar" id="regexp"/>
         
         <!-- dependencies -->

Modified: gump/branches/Gump3/pygump/python/gump/config.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/config.py?rev=210156&r1=210155&r2=210156&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/config.py (original)
+++ gump/branches/Gump3/pygump/python/gump/config.py Mon Jul 11 10:02:07 2005
@@ -196,7 +196,7 @@
     
     dictionary = {}
     dictionary["GUMP_VERSION"] = config.version
-    dictionary["DATE"] = time.strftime("%Y%m%d%h%M")
+    dictionary["DATE"] = time.strftime("%Y%m%d%H%M")
     
     return dictionary
 

Modified: gump/branches/Gump3/pygump/python/gump/engine/objectifier.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/objectifier.py?rev=210156&r1=210155&r2=210156&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/objectifier.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/objectifier.py Mon Jul 11 10:02:07 2005
@@ -200,6 +200,17 @@
                 command.env.pop(envname)
 
 
+def _create_properties(command, cmd):
+    command.properties = {}
+    for prop in cmd.getElementsByTagName("property"):
+        propname = prop.getAttribute("name")
+        propvalue = prop.getAttribute("value")
+        if not propname or not propvalue:
+            continue
+        
+        command.properties[propname] = propvalue
+                
+                
 def _get_args(cmd):
     args = []
     for arg in cmd.getElementsByTagName("arg"):
@@ -258,8 +269,10 @@
         buildfile = cmd.getAttribute("buildfile")
         target = cmd.getAttribute("target")
         basedir = cmd.getAttribute("basedir")
-            
-        project.add_command(Ant(project, target, buildfile, basedir=basedir))
+        command = Ant(project, target, buildfile, basedir=basedir)
+        _create_properties(command, cmd)
+
+        project.add_command(command)
 
 
 def _create_outputs(project, project_definition):    

Modified: gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py?rev=210156&r1=210155&r2=210156&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py Mon Jul 11 10:02:07 2005
@@ -68,9 +68,9 @@
         if ant.buildfile: args += ["-buildfile",ant.buildfile]
         if ant.target: args += [ant.target]
         if self.debug: args += ["-debug"]
-        
-        # TODO properties
-        # TODO parse @@DATE@@ from properties
+
+        for k,v in ant.properties.iteritems():
+            args.append("-D%s=%s" % (k,v))
         
         # run it
         #



Mime
View raw message