gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r959847 - in /gump/trunk/python/gump: actor/mvnrepoproxy/proxycontrol.py core/model/output.py
Date Fri, 02 Jul 2010 04:22:41 GMT
Author: bodewig
Date: Fri Jul  2 04:22:41 2010
New Revision: 959847

URL: http://svn.apache.org/viewvc?rev=959847&view=rev
Log:
move the 'is this a jar?' logic to output class

Modified:
    gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py
    gump/trunk/python/gump/core/model/output.py

Modified: gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py?rev=959847&r1=959846&r2=959847&view=diff
==============================================================================
--- gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py (original)
+++ gump/trunk/python/gump/actor/mvnrepoproxy/proxycontrol.py Fri Jul  2 04:22:41 2010
@@ -21,8 +21,7 @@ import time
 import urllib
 
 from gump import log
-from gump.core.model.output import OUTPUT_BOOTCLASSPATH_JAR, OUTPUT_JAR, \
-    OUTPUT_POM, OUTPUT_TESTS_JAR
+from gump.core.model.output import OUTPUT_POM
 from gump.core.run.actor import AbstractRunActor, FinalizeRunEvent, \
     InitializeRunEvent
 
@@ -46,10 +45,7 @@ class MvnRepositoryProxyController(Abstr
         if project.okToPerformWork() and project.hasOutputs():
             groupId = project.getArtifactGroup()
             for output in project.getOutputs():
-                if output.getType() == OUTPUT_JAR \
-                        or output.getType() == OUTPUT_BOOTCLASSPATH_JAR \
-                        or output.getType() == OUTPUT_TESTS_JAR \
-                        or output.getType() == OUTPUT_POM:
+                if output.is_jar() or output.getType() == OUTPUT_POM:
                     fileName = os.path.abspath(output.getPath())
                     try:
                         log.info('Publishing \'%s\' output \'%s\' to proxy'

Modified: gump/trunk/python/gump/core/model/output.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/output.py?rev=959847&r1=959846&r2=959847&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/output.py (original)
+++ gump/trunk/python/gump/core/model/output.py Fri Jul  2 04:22:41 2010
@@ -68,3 +68,9 @@ class Output(NamedModelObject):
     def setType(self, t):
         """ optional type of output """
         self.type = t
+
+    def is_jar(self):
+        """ is this some sort of jar output? """
+        return self.type in [OUTPUT_BOOTCLASSPATH_JAR, \
+                                 OUTPUT_JAR, \
+                                 OUTPUT_TESTS_JAR]



Mime
View raw message