You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/08/28 20:33:49 UTC

svn commit: r689926 - /geronimo/genesis/trunk/pom.xml

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>