gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r168564 - in /gump/branches/Gump3/pygump/python/gump: engine/objectifier.py model/__init__.py plugins/java/builder.py
Date Fri, 06 May 2005 08:05:38 GMT
Author: leosimons
Date: Fri May  6 01:05:38 2005
New Revision: 168564

URL: http://svn.apache.org/viewcvs?rev=168564&view=rev
Log:
Make ant support work (assuming an 'ant' command is installed for now).

* pygump/python/gump/model/__init__.py,
  pygump/python/gump/plugins/java/builder.py,
  pygump/python/gump/engine/objectifier.py: fix a few bugs with the ant support, and actually
implement running ant in the builder.

Modified:
    gump/branches/Gump3/pygump/python/gump/engine/objectifier.py
    gump/branches/Gump3/pygump/python/gump/model/__init__.py
    gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py

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=168564&r1=168563&r2=168564&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/objectifier.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/objectifier.py Fri May  6 01:05:38 2005
@@ -209,7 +209,7 @@
     ants = project_definition.getElementsByTagName("ant")
     for cmd in ants:
         name = cmd.getAttribute("name")
-        buildfile = cmd.getAttribute("target")
+        buildfile = cmd.getAttribute("buildfile")
         target = cmd.getAttribute("target")
             
         project.add_command(Ant(project, name, target, buildfile))

Modified: gump/branches/Gump3/pygump/python/gump/model/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/model/__init__.py?rev=168564&r1=168563&r2=168564&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/model/__init__.py (original)
+++ gump/branches/Gump3/pygump/python/gump/model/__init__.py Fri May  6 01:05:38 2005
@@ -500,7 +500,7 @@
         - target -- the Ant target
         - buildfile -- the Ant build file
     """
-    def __init__(self, project, name, target, buildfile):
+    def __init__(self, project, name, target, buildfile="build.xml"):
         assert isinstance(name, basestring)
         assert isinstance(target, basestring)
         assert isinstance(buildfile, basestring)

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=168564&r1=168563&r2=168564&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/java/builder.py Fri May  6 01:05:38 2005
@@ -221,15 +221,23 @@
         
 class AntPlugin(BuilderPlugin):
     """Execute all "ant" commands for all projects."""
-    def __init__(self, workdir, log):
+    def __init__(self, workdir, log, debug=False):
         BuilderPlugin.__init__(self, workdir, log, Ant, self._do_ant)
+        self.debug = debug
         
     def _do_ant(self, project, ant):                
         projectpath = get_project_directory(self.workdir,project)
         
-        buildfile = abspath(join(projectpath, ant.name))        
-        
-        #TODO
-        import pprint
+        # TODO get proper classpath
         self.log.debug('CLASSPATH %s' % ant.classpath)
-        self.log.debug('BOOTCLASSPATH %s' % ant.boot_classpath)
\ No newline at end of file
+        self.log.debug('BOOTCLASSPATH %s' % ant.boot_classpath)
+        # TODO test this
+        # TODO sysclasspath only
+        # TODO more options
+        args = ["ant","-buildfile",ant.buildfile,ant.target]
+        if self.debug:
+            args += "-debug"
+        cmd = Popen(args,shell=False,cwd=projectpath,stdout=PIPE,stderr=STDOUT)
+
+        ant.build_log = cmd.communicate()[0]
+        ant.build_exit_status = cmd.wait()



Mime
View raw message