gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r966498 - in /gump/live: ./ python/gump/core/language/java.py python/gump/core/model/builder.py python/gump/core/model/project.py python/gump/core/update/bzr.py python/gump/core/update/darcs.py python/gump/core/update/hg.py
Date Thu, 22 Jul 2010 04:26:24 GMT
Author: bodewig
Date: Thu Jul 22 04:26:24 2010
New Revision: 966498

URL: http://svn.apache.org/viewvc?rev=966498&view=rev
Log:
merge mvn2install 'builder' from trunk

Modified:
    gump/live/   (props changed)
    gump/live/python/gump/core/language/java.py   (props changed)
    gump/live/python/gump/core/model/builder.py
    gump/live/python/gump/core/model/project.py
    gump/live/python/gump/core/update/bzr.py   (props changed)
    gump/live/python/gump/core/update/darcs.py   (props changed)
    gump/live/python/gump/core/update/hg.py   (props changed)

Propchange: gump/live/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 04:26:24 2010
@@ -1 +1 @@
-/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048
+/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730

Propchange: gump/live/python/gump/core/language/java.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 04:26:24 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401,962981,962990,962993,963021-963048
+/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401,962981,962990,962993,963021-963048,965728-965730

Modified: gump/live/python/gump/core/model/builder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/builder.py?rev=966498&r1=966497&r2=966498&view=diff
==============================================================================
--- gump/live/python/gump/core/model/builder.py (original)
+++ gump/live/python/gump/core/model/builder.py Thu Jul 22 04:26:24 2010
@@ -328,6 +328,38 @@ class Maven2(Builder):
             return None
         return self.local_repo
 
+class Mvn2Install(Maven2):
+    """ Installs a single file into the local mvn repository """
+
+    def __init__(self, dom, project):
+        Maven2.__init__(self, dom, project)
+        self.goal = 'install:install-file'
+        self.packaging = self.getDomAttributeValue('packaging', 'pom')
+        self.file = self.getDomAttributeValue('file', 'pom.xml')
+        self.version = self.getDomAttributeValue('version')
+        self.artifactId = self.getDomAttributeValue('artifactId')
+
+    def expand(self, project, workspace):
+        """ Turns the builder's attributes into properties """
+        Builder.expand(self, project, workspace)
+
+        impl = getDOMImplementation()
+        if (self.artifactId):
+            self.add_property(impl, 'artifactId', self.artifactId)
+        else:
+            self.add_property(impl, 'artifactId', project.getName())
+        self.add_property(impl, 'groupId', project.getArtifactGroup())
+        self.add_property(impl, 'packaging', self.packaging)
+        self.add_property(impl, 'file', self.file)
+        self.add_property(impl, 'version', self.version)
+
+    def add_property(self, impl, name, value):
+        """ Adds a named property """
+        doc = impl.createDocument(None, 'property', None)
+        prop = doc.documentElement
+        prop.setAttribute('name', name)
+        prop.setAttribute('value', value)
+        self.importProperty(prop)
 
 # represents an <configure/> element
 class Configure(Builder):

Modified: gump/live/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/project.py?rev=966498&r1=966497&r2=966498&view=diff
==============================================================================
--- gump/live/python/gump/core/model/project.py (original)
+++ gump/live/python/gump/core/model/project.py Thu Jul 22 04:26:24 2010
@@ -28,8 +28,8 @@ import gump.util.process.command
 
 from gump import log
 from gump.core.config import default
-from gump.core.model.builder import Ant, NAnt, Maven, Maven2, Script, \
-    Configure, Make
+from gump.core.model.builder import Ant, NAnt, Maven, Maven2, Mvn2Install, \
+    Script, Configure, Make
 from gump.core.model.depend import Dependable, importDomDependency
 from gump.core.model.misc import AddressPair, \
     Resultable, Positioned, Mkdir, Delete, JunitReport, Work
@@ -461,6 +461,14 @@ class Project(NamedModelObject, Statable
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.maven, self)
 
+        # Import any <mvn2install part [if not packaged]
+        if self.hasDomChild('mvn2install') and not packaged:
+            self.mvn = Mvn2Install(self.getDomChild('mvn2install'), self)
+            self.builder.append(self.mvn)
+
+            # Copy over any XML errors/warnings
+            # :TODO:#1: transferAnnotations(self.xml.maven, self)
+
         # Import any <script part [if not packaged]
         if self.hasDomChild('script') and not packaged:
             self.script = Script(self.getDomChild('script'), self)
@@ -645,12 +653,6 @@ class Project(NamedModelObject, Statable
         if self.ant:
             self.addJVMArgs(self.getDomChild("ant"))
 
-        if self.maven:
-            self.addJVMArgs(self.getDomChild("maven"))
-
-        if self.mvn:
-            self.addJVMArgs(self.getDomChild("mvn"))
-
         #
         # complete properties
         #

Propchange: gump/live/python/gump/core/update/bzr.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 04:26:24 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048
+/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730

Propchange: gump/live/python/gump/core/update/darcs.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 04:26:24 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048
+/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730

Propchange: gump/live/python/gump/core/update/hg.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 04:26:24 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048
+/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730



Mime
View raw message