You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2003/09/24 18:57:12 UTC

cvs commit: jakarta-gump/python/gump model.py logic.py

ajack       2003/09/24 09:57:12

  Modified:    python/gump model.py logic.py
  Log:
  1) Support "buildfile" on <ant
  2) For some reason <ant properties were commented out, uncommented.
  
  Revision  Changes    Path
  1.18      +4 -4      jakarta-gump/python/gump/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- model.py	23 Sep 2003 23:16:20 -0000	1.17
  +++ model.py	24 Sep 2003 16:57:12 -0000	1.18
  @@ -343,7 +343,7 @@
     
   # represents an <ant/> element
   class Ant(GumpModelObject):
  -  def init(self):
  +  def init(self):  
       self.depend=Multiple(Depend)
       self.property=Multiple(Property)
       self.jvmarg=Multiple(GumpModelObject)
  
  
  
  1.4       +9 -4      jakarta-gump/python/gump/logic.py
  
  Index: logic.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/logic.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- logic.py	23 Sep 2003 23:16:20 -0000	1.3
  +++ logic.py	24 Sep 2003 16:57:12 -0000	1.4
  @@ -237,18 +237,23 @@
           
   def getAntCommand(workspace,module,project,ant,context):
       target= ant.target or ''
  -
  +    buildfile = ant.buildfile or ''
  +    
       basedir = os.path.normpath(os.path.join(module.srcdir or dir.base,ant.basedir or ''))
       classpath=getClasspath(project,workspace)
       properties=getAntProperties(workspace,ant)
      
  -    cmd=Cmd(context.javaCommand,'build_'+module.name+'_'+project.name,basedir,{'CLASSPATH':classpath})
  +    cmd=Cmd(context.javaCommand,'build_'+module.name+'_'+project.name,\
  +            basedir,{'CLASSPATH':classpath})
       cmd.addParameter('org.apache.tools.ant.Main')  
       if context.debug:
           cmd.addParameter('-debug')  
       cmd.addPrefixedParameter('-D','build.sysclasspath','only','=')
  +    
  +    # These are module level plus project level
       cmd.addNamedParameters(properties)
  -    # build file?
  +    
  +    if buildfile: cmd.addParameter('-f',buildfile)
       if target: cmd.addParameter(target)
       
       return cmd
  @@ -323,7 +328,7 @@
   def getAntProperties(workspace,ant):
     """Get properties for a project"""
     properties=Parameters()
  -  for property in workspace.property:#+ant.property:
  +  for property in workspace.property+ant.property:
       properties.addPrefixedNamedParameter('-D',property.name,property.value,'=')
     return properties