Mercurial > public > develkit
comparison fixivy.groovy @ 92:90325a10fe95
correct develkit location
author | smith@nwoca.org |
---|---|
date | Wed, 22 Feb 2012 04:50:48 +0000 |
parents | c207cdcaf13e |
children |
comparison
equal
deleted
inserted
replaced
91:b72ba5cb5c53 | 92:90325a10fe95 |
---|---|
70 dep.@conf = 'compile-test->default(*)' | 70 dep.@conf = 'compile-test->default(*)' |
71 } else if ( dep.@conf.text().contains('castor-ant') ) { | 71 } else if ( dep.@conf.text().contains('castor-ant') ) { |
72 dep.@conf = 'castor-ant->default(*)' | 72 dep.@conf = 'castor-ant->default(*)' |
73 } else if (dep.@conf.text() == 'runtime->default' ) { | 73 } else if (dep.@conf.text() == 'runtime->default' ) { |
74 // preserve | 74 // preserve |
75 } else if (dep.@conf.text().contains('groovy') ) { | |
76 // preserve | |
75 } else{ | 77 } else{ |
76 dep.attributes().remove('conf') | 78 // dep.attributes().remove('conf') |
77 } | 79 } |
78 } | 80 } |
79 | 81 |
80 // ensure(ivy.dependencies,["org.spockframework:spock-core:0.5-groovy-1.8"]) | 82 // ensure(ivy.dependencies,["org.spockframework:spock-core:0.5-groovy-1.8"]) |
81 | 83 |
88 // ensure(ivy.dependencies, 'org.springframework.test', ['org.junit:com.springsource.org.junit:4.9.0']) | 90 // ensure(ivy.dependencies, 'org.springframework.test', ['org.junit:com.springsource.org.junit:4.9.0']) |
89 // ensure(ivy.dependencies, 'org.springframework.test', ["org.spockframework:spock-spring:0.5-groovy-1.8"]) | 91 // ensure(ivy.dependencies, 'org.springframework.test', ["org.spockframework:spock-spring:0.5-groovy-1.8"]) |
90 | 92 |
91 | 93 |
92 // find groovy dependencies (or null) | 94 // find groovy dependencies (or null) |
95 /* | |
93 groovy = ivy.dependencies.children().find { it.@org == 'org.codehaus.groovy' && it.@name.text().startsWith('groovy') } | 96 groovy = ivy.dependencies.children().find { it.@org == 'org.codehaus.groovy' && it.@name.text().startsWith('groovy') } |
94 | 97 |
95 if (groovy) { | 98 if (groovy) { |
96 // Add a groovy conig for groovy projects: | 99 // Add a groovy conig for groovy projects: |
97 if (!cfgs.children().any { it.@name == 'groovy' } ) { | 100 if (!cfgs.children().any { it.@name == 'groovy' } ) { |
116 println "updating groovy in $template" | 119 println "updating groovy in $template" |
117 ant.replace(file: template, token: 'org.codehaus.groovy-groovy:major',value:'org.codehaus.groovy-groovy-all:major') | 120 ant.replace(file: template, token: 'org.codehaus.groovy-groovy:major',value:'org.codehaus.groovy-groovy-all:major') |
118 } | 121 } |
119 | 122 |
120 } | 123 } |
121 | 124 */ |
122 // resolveJunit(ivy.dependencies) | 125 // resolveJunit(ivy.dependencies) |
123 | 126 |
124 // remove exclude for groovy-all | 127 // remove exclude for groovy-all |
125 ivy.dependencies.children().find { it.name() == 'exclude' && it.@module.text() == 'groovy-all' }.replaceNode {} | 128 ivy.dependencies.children().find { it.name() == 'exclude' && it.@module.text() == 'groovy-all' }.replaceNode {} |
126 // remove exclude for commons logging | 129 // remove exclude for commons logging |
127 ivy.dependencies.children().find { it.name() == 'exclude' && it.@module.text() == 'com.springsource.org.apache.commons.logging' }.replaceNode {} | 130 ivy.dependencies.children().find { it.name() == 'exclude' && it.@module.text() == 'com.springsource.org.apache.commons.logging' }.replaceNode {} |
128 | 131 |
129 // Add exclude for regular groovy: | 132 // Add exclude for regular groovy: |
130 ensureExcluded(ivy.dependencies,"org.codehaus.groovy:groovy") | 133 // ensureExcluded(ivy.dependencies,"org.codehaus.groovy:groovy") |
131 | 134 |
132 // ensure modules covered by springsource are exluded; | 135 // ensure modules covered by springsource are exluded; |
133 // ensureSpringSourceExcludes(ivy.dependencies) | 136 // ensureSpringSourceExcludes(ivy.dependencies) |
134 /* | 137 /* |
135 ensureConfiguration(ivy.dependencies,'org.springframework.test','compile-test->*') | 138 ensureConfiguration(ivy.dependencies,'org.springframework.test','compile-test->*') |
146 println "replacing ${it.name()} ${it.@org} ${it.@module} as junit:junit" | 149 println "replacing ${it.name()} ${it.@org} ${it.@module} as junit:junit" |
147 it.@org = 'junit' | 150 it.@org = 'junit' |
148 it.@module = 'junit' | 151 it.@module = 'junit' |
149 } | 152 } |
150 */ | 153 */ |
151 cfgs.children().each { it.@visibility = 'private' } // Should be 'private' after initial conversions. | 154 cfgs.children().each { it.@visibility = 'public' } // Should be 'private' after initial conversions. |
152 | 155 |
153 cfgs.children().find {it.@name == 'runtime' }.@extends = 'compile' | 156 cfgs.children().find {it.@name == 'runtime' }.@extends = 'compile' |
154 cfgs.children().find {it.@name == 'compile-test' }.@extends = 'compile' | 157 cfgs.children().find {it.@name == 'compile-test' }.@extends = 'compile' |
155 cfgs.children().find {it.@name == 'runtime-test' }.@extends = 'runtime,compile-test' | 158 cfgs.children().find {it.@name == 'runtime-test' }.@extends = 'runtime,compile-test' |
156 cfgs.children().find {it.@name == 'runtime-test' }.@visibility = 'public' | 159 cfgs.children().find {it.@name == 'runtime-test' }.@visibility = 'public' |
160 cfgs.children().find {it.@name == 'compile-test' }.@visibility = 'public' | |
157 cfgs.children().find {it.@name == 'default' }.@visibility = 'public' | 161 cfgs.children().find {it.@name == 'default' }.@visibility = 'public' |
158 cfgs.children().find {it.@name == 'default' }.@extends = 'runtime' | 162 cfgs.children().find {it.@name == 'default' }.@extends = 'runtime' |
159 | 163 |
160 if (!cfgs.children().any { it.@name == 'archives' } ) { | 164 if (!cfgs.children().any { it.@name == 'archives' } ) { |
161 println "added public 'archives' conf" | 165 println "added public 'archives' conf" |