changeset 169:c4b7c8a11913

normalize spring security
author Dave Smith <smith@nwoca.org>
date Thu, 30 Jan 2014 02:39:30 +0000
parents 7f023317034b
children e7824d2c2ca0
files init.gradle
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/init.gradle	Wed Jan 29 16:33:39 2014 +0000
+++ b/init.gradle	Thu Jan 30 02:39:30 2014 +0000
@@ -23,16 +23,22 @@
 	gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim()
 } catch (e) {  }
 
-def springModuleTranslator = ['spring-transaction':'spring-tx'].withDefault { it }
+def springModuleTranslator = [
+	'spring-transaction' : 'spring-tx',
+	'spring-web-servlet' : 'spring-webmvc',
+	].withDefault { it }
 
 gradle.ext.normalizeSpring = { DependencyResolveDetails details ->
-            if (details.requested.group == 'org.springframework') {
-                if (details.requested.name.startsWith ('org.springframework.' )) {
-                    def shortName = springModuleTranslator[details.requested.name.replace('org.springframework.', 'spring-').replace('.','-')]
-                    details.useTarget(group: 'org.springframework', name: shortName, version: details.requested.version)
-                }
-            }
-        }
+		if (details.requested.group == 'org.springframework' && details.requested.name.startsWith ('org.springframework.' )) {
+			def shortName = springModuleTranslator[details.requested.name.replace('org.springframework.', 'spring-').replace('.','-')]
+			details.useTarget(group: 'org.springframework', name: shortName, version: details.requested.version)
+		}
+		if (details.requested.group == 'org.springframework.security' && details.requested.name.startsWith ('org.springframework.' )) {
+			def shortName = springModuleTranslator[details.requested.name.replace('org.springframework.', 'spring-').replace('.','-')]
+			details.useTarget( "${details.requested.group}:$shortName:${details.requested.version}")
+		}
+	}
+       
 
 gradle.ext.branchName = System.getenv('bamboo_planRepository_branch')
 gradle.ext.branchStream = ""