gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1066928 - in /gump/trunk/python/gump/core/model: builder.py project.py
Date Thu, 03 Feb 2011 19:49:16 GMT
Author: bodewig
Date: Thu Feb  3 19:49:16 2011
New Revision: 1066928

URL: http://svn.apache.org/viewvc?rev=1066928&view=rev
Log:
mvn3install builder

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

Modified: gump/trunk/python/gump/core/model/builder.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/builder.py?rev=1066928&r1=1066927&r2=1066928&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/builder.py (original)
+++ gump/trunk/python/gump/core/model/builder.py Thu Feb  3 19:49:16 2011
@@ -357,7 +357,7 @@ class MvnInstall(Maven):
         self.packaging = self.getDomAttributeValue(MvnInstall.PACKAGING,
                                                    MvnInstall.POM)
         self.file = self.getDomAttributeValue(MvnInstall.FILE, 'pom.xml')
-        self.version = self.getDomAttributeValue(MvnInstall.VERSION)
+        self.artifactVersion = self.getDomAttributeValue(MvnInstall.VERSION)
         self.artifactId = self.getDomAttributeValue(MvnInstall.ARTIFACT_ID)
 
     def expand(self, project, workspace):
@@ -370,8 +370,8 @@ class MvnInstall(Maven):
         self._add_property(impl, 'groupId', project.getArtifactGroup())
         self._add_property(impl, MvnInstall.PACKAGING, self.packaging)
         self._add_property(impl, MvnInstall.FILE, self.file)
-        if self.version:
-            self._add_property(impl, MvnInstall.VERSION, self.version)
+        if self.artifactVersion:
+            self._add_property(impl, MvnInstall.VERSION, self.artifactVersion)
         elif not self.packaging == MvnInstall.POM:
             project.addError("version attribute is mandatory if the file is"
                              + " not a POM.")
@@ -383,7 +383,7 @@ class MvnInstall(Maven):
         """
         props = PropertyContainer.getProperties(self)[:]
 
-        if not self.version and self.packaging == MvnInstall.POM:
+        if not self.artifactVersion and self.packaging == MvnInstall.POM:
             try:
                 pomDoc = self._read_pom()
                 root = pomDoc.documentElement

Modified: gump/trunk/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/project.py?rev=1066928&r1=1066927&r2=1066928&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/project.py (original)
+++ gump/trunk/python/gump/core/model/project.py Thu Feb  3 19:49:16 2011
@@ -469,7 +469,7 @@ class Project(NamedModelObject, Statable
         # Import any <mvninstall part [if not packaged]
         for tag in ['mvninstall', 'mvn2install']:
             if self.hasDomChild(tag) and not packaged:
-                self.mvn = MvnInstall(self.getDomChild(tag), self)
+                self.mvn = MvnInstall(self.getDomChild(tag), self, MVN_VERSION2)
                 self.builder.append(self.mvn)
 
             # Copy over any XML errors/warnings
@@ -480,6 +480,12 @@ class Project(NamedModelObject, Statable
             self.mvn = Maven(self.getDomChild('mvn3'), self, MVN_VERSION3)
             self.builder.append(self.mvn)
 
+        # Import any <mvn3install part [if not packaged]
+        if self.hasDomChild('mvn3install') and not packaged:
+            self.mvn = MvnInstall(self.getDomChild('mvn3install'), self,
+                                  MVN_VERSION3)
+            self.builder.append(self.mvn)
+
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.maven, self)
 



Mime
View raw message