gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r579054 - in /gump/trunk/python/gump/core: build/mvn.py config.py model/workspace.py run/gumpenv.py
Date Tue, 25 Sep 2007 04:26:43 GMT
Author: bodewig
Date: Mon Sep 24 21:26:37 2007
New Revision: 579054

URL: http://svn.apache.org/viewvc?rev=579054&view=rev
Log:
Add initial infrastructure for maven repository proxy

Modified:
    gump/trunk/python/gump/core/build/mvn.py
    gump/trunk/python/gump/core/config.py
    gump/trunk/python/gump/core/model/workspace.py
    gump/trunk/python/gump/core/run/gumpenv.py

Modified: gump/trunk/python/gump/core/build/mvn.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/build/mvn.py?rev=579054&r1=579053&r2=579054&view=diff
==============================================================================
--- gump/trunk/python/gump/core/build/mvn.py (original)
+++ gump/trunk/python/gump/core/build/mvn.py Mon Sep 24 21:26:37 2007
@@ -236,17 +236,22 @@
 # DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT  DO NOT EDIT
 -->
 <settings>
-  <localRepository>%s</localRepository>
-  <!--mirrors>
+  <localRepository>%s</localRepository>""")
+                    % (project.getName(), time.strftime('%Y-%m-%d %H:%M:%S'),
+                       localRepositoryDir))
+        if not self.run.getEnvironment().noMvnRepoProxy:
+            props.write("""
+  <mirrors>
     <mirror>
       <id>Gump</id>
       <name>Gump</name>
-      <url>http://localhost:8192/maven2</url>
+      <url>http://localhost:%s/maven2</url>
       <mirrorOf>central</mirrorOf>
     </mirror>
-  </mirrors-->
-</settings>""")	% (project.getName(), time.strftime('%Y-%m-%d %H:%M:%S'),
-                   localRepositoryDir) )
+  </mirrors>""" % (self.run.getWorkspace().mvnRepoProxyPort) )
+
+        props.write("</settings>")
+                   
         return settingsFile
 
     def locateMvnSettings(self, project):

Modified: gump/trunk/python/gump/core/config.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/config.py?rev=579054&r1=579053&r2=579054&view=diff
==============================================================================
--- gump/trunk/python/gump/core/config.py (original)
+++ gump/trunk/python/gump/core/config.py Mon Sep 24 21:26:37 2007
@@ -103,6 +103,8 @@
     prefix = '[GUMP@' + gumphost + ']'
     signature="\r\n--\r\nApache Gump\nhttp://gump.apache.org/ " \
         + '[Instance: ' + gumpfullhost + "]\n"
+
+    mvnRepoProxyPort = 8192
         
     # Information for portability
     if not os.name == 'dos' and not os.name == 'nt':

Modified: gump/trunk/python/gump/core/model/workspace.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/workspace.py?rev=579054&r1=579053&r2=579054&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/workspace.py (original)
+++ gump/trunk/python/gump/core/model/workspace.py Mon Sep 24 21:26:37 2007
@@ -296,6 +296,7 @@
         self.mailport = int(default.mailport)
         self.prefix=default.prefix
         self.signature=default.signature
+        self.mvnRepoProxyPort = default.mvnRepoProxyPort
         
         # Import overrides from DOM
         transferDomInfo(self.element, 

Modified: gump/trunk/python/gump/core/run/gumpenv.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/run/gumpenv.py?rev=579054&r1=579053&r2=579054&view=diff
==============================================================================
--- gump/trunk/python/gump/core/run/gumpenv.py (original)
+++ gump/trunk/python/gump/core/run/gumpenv.py Mon Sep 24 21:26:37 2007
@@ -81,6 +81,7 @@
         self.noJava = False
         self.noJavac = False
         self.noMake = False    
+        self.noMvnRepoProxy = False
         
         self.javaProperties = None
     
@@ -137,6 +138,11 @@
             self.noMaven=True
             self.addWarning('M2_HOME environmental variable not found, no mvn builds.')
             
+        if not self.noMvnRepoProxy \
+                and not self._checkEnvVariable('MVN_PROXY_HOME', False):
+            self.noMvnRepoProxy = True
+            self.addWarning('MVN_PROXY_HOME environmental variable not found, no using a
proxy for Maven2 repository')
+
         # Check for executables
         
         self._checkExecutable('env','',False)



Mime
View raw message