gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r618894 - in /gump/trunk/python/gump/core/model: module.py project.py
Date Wed, 06 Feb 2008 05:07:21 GMT
Author: bodewig
Date: Tue Feb  5 21:07:21 2008
New Revision: 618894

URL: http://svn.apache.org/viewvc?rev=618894&view=rev
Log:
make groupId configurable

Modified:
    gump/trunk/python/gump/core/model/module.py
    gump/trunk/python/gump/core/model/project.py

Modified: gump/trunk/python/gump/core/model/module.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/module.py?rev=618894&r1=618893&r2=618894&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/module.py (original)
+++ gump/trunk/python/gump/core/model/module.py Tue Feb  5 21:07:21 2008
@@ -257,6 +257,7 @@
         self.workspace=None
         self.workdir=None
         
+        self.groupId=None
            
     def getObjectForTag(self,tag,dom,name=None):
         """
@@ -330,6 +331,7 @@
         
         # Defaults
         self.workdir=self.getName()
+        self.groupId=self.getName()
              
         # Import overrides from DOM
         transferDomInfo( self.element, self, {'srcdir':'workdir'})
@@ -502,10 +504,14 @@
             
         if self.hasDomChild('description'):
             self.desc=self.getDomChildValue('description')           
-        
+
         # Existence means 'true'
         self.redistributable=self.hasDomChild('redistributable')    
 
+        # make groupId default to module's name
+        if not self.groupId:
+            self.groupId = self.getName();
+
         # For prettiness
         self.sortedProjects=createOrderedList(self.getProjects())
                             
@@ -523,12 +529,11 @@
         
     def getArtifactGroup(self):
         """
-        What does this projects artifacts group under?
-        Right now ... the module name
+        What do this module's artifacts group under?
         
         Return String
         """
-        return self.getName()
+        return self.groupId
         
     def addProject(self,project):
         """

Modified: gump/trunk/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/project.py?rev=618894&r1=618893&r2=618894&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/project.py (original)
+++ gump/trunk/python/gump/core/model/project.py Tue Feb  5 21:07:21 2008
@@ -94,6 +94,7 @@
     
         self.url=None
         self.desc=''
+        self.groupId=''
         
         self.redistributable=False
         self.packageMarker=None
@@ -141,11 +142,13 @@
         
     def getArtifactGroup(self):
         """
-        What does this projects artifacts group under?
-        Ask the module...
+        What do this project's artifacts group under?
+        Ask the module unless overridden
         
         Return String
         """
+        if self.groupId:
+            return self.groupId
         return self.getModule().getArtifactGroup()
         
     def hasAnt(self):



Mime
View raw message