You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by bo...@apache.org on 2010/10/27 06:29:55 UTC

svn commit: r1027813 - in /gump/trunk/python/gump/core: build/maven.py build/mvn.py model/project.py

Author: bodewig
Date: Wed Oct 27 04:29:54 2010
New Revision: 1027813

URL: http://svn.apache.org/viewvc?rev=1027813&view=rev
Log:
add support for jvmarg to Maven [12].x builders

Modified:
    gump/trunk/python/gump/core/build/maven.py
    gump/trunk/python/gump/core/build/mvn.py
    gump/trunk/python/gump/core/model/project.py

Modified: gump/trunk/python/gump/core/build/maven.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/build/maven.py?rev=1027813&r1=1027812&r2=1027813&view=diff
==============================================================================
--- gump/trunk/python/gump/core/build/maven.py (original)
+++ gump/trunk/python/gump/core/build/maven.py Wed Oct 27 04:29:54 2010
@@ -200,6 +200,12 @@ class MavenBuilder(RunSpecific):
             cmd = getMavenCommand(project)
 
             if cmd:
+                # Get/set JVM properties
+                jvmargs = languageHelper.getJVMArgs(project)
+                if jvmargs and len(jvmargs.items()) > 0:
+                    cmd.addEnvironment('MAVEN_OPTS',
+                                       jvmargs.formatCommandLine())
+
                 # Execute the command ....
                 cmdResult = execute(cmd, workspace.tmpdir)
 

Modified: gump/trunk/python/gump/core/build/mvn.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/build/mvn.py?rev=1027813&r1=1027812&r2=1027813&view=diff
==============================================================================
--- gump/trunk/python/gump/core/build/mvn.py (original)
+++ gump/trunk/python/gump/core/build/mvn.py Wed Oct 27 04:29:54 2010
@@ -141,6 +141,12 @@ class Maven2Builder(RunSpecific):
             cmd = getMavenCommand(project)
 
             if cmd:
+                # Get/set JVM properties
+                jvmargs = languageHelper.getJVMArgs(project)
+                if jvmargs and len(jvmargs.items()) > 0:
+                    cmd.addEnvironment('MAVEN_OPTS',
+                                       jvmargs.formatCommandLine())
+
                 # Execute the command ....
                 cmdResult = execute(cmd, workspace.tmpdir)
 

Modified: gump/trunk/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/project.py?rev=1027813&r1=1027812&r2=1027813&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/project.py (original)
+++ gump/trunk/python/gump/core/model/project.py Wed Oct 27 04:29:54 2010
@@ -652,8 +652,10 @@ class Project(NamedModelObject, Statable
         if self.hasDomChild('description'):
             self.desc = self.getDomChildValue('description')
 
-        if self.ant:
-            self.addJVMArgs(self.getDomChild("ant"))
+        jvmargs_parents = ['ant', 'maven', 'mvn']
+        for tag in jvmargs_parents:
+            if self.hasDomChild(tag):
+                self.addJVMArgs(self.getDomChild(tag))
 
         #
         # complete properties