geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r689926 - /geronimo/genesis/trunk/pom.xml
Date Thu, 28 Aug 2008 18:33:49 GMT
Author: jdillon
Date: Thu Aug 28 11:33:49 2008
New Revision: 689926

URL: http://svn.apache.org/viewvc?rev=689926&view=rev
Log:
try to simplify things, not really getting what I want yet

Modified:
    geronimo/genesis/trunk/pom.xml

Modified: geronimo/genesis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/pom.xml?rev=689926&r1=689925&r2=689926&view=diff
==============================================================================
--- geronimo/genesis/trunk/pom.xml (original)
+++ geronimo/genesis/trunk/pom.xml Thu Aug 28 11:33:49 2008
@@ -125,15 +125,27 @@
                         <configuration>
                             <source>
                                 if (!project.groupId.startsWith('org.apache.geronimo.genesis'))
{
-                                    if (project.scm.connection.startsWith('scm:svn:http://svn.apache.org/repos/asf/geronimo/genesis'))
{
-                                        fail('Genesis child must configure: scm.connection')
-                                    }
-                                    if (project.scm.developerConnection.startsWith('scm:svn:https://svn.apache.org/repos/asf/geronimo/genesis'))
{
-                                        fail('Genesis child must configure: scm.developerConnection')
-                                    }
-                                    if (project.scm.url.startsWith('http://svn.apache.org/viewvc/geronimo/geronimo/genesis'))
{
-                                        fail('Genesis child must configure: scm.url')
+                                    //
+                                    // TODO: See if we can use GPath to simplify validation
muck
+                                    //
+                                    
+                                    def failIfNotConfigured = { var, value, name ->
+                                        if (var.startsWith(value)) {
+                                            fail("Genesis child project must configure: $name")
+                                        }
                                     }
+                                    
+                                    failIfNotConfigured(project.scm.connection,
+                                        'scm:svn:http://svn.apache.org/repos/asf/geronimo/genesis',
+                                        'scm.connection')
+                                    
+                                    failIfNotConfigured(project.scm.developerConnection,
+                                        'scm:svn:https://svn.apache.org/repos/asf/geronimo/genesis',
+                                        'scm.developerConnection')
+                                    
+                                    failIfNotConfigured(project.scm.url,
+                                        'http://svn.apache.org/viewvc/geronimo/geronimo/genesis',
+                                        'scm.url')
                                 }
                             </source>
                         </configuration>



Mime
View raw message