/EvenCoreGroovySuffers.groovy Secret
Last active
March 27, 2016 00:58
Star
You must be signed in to star a gist
Ivy Ant cannot download from Rubygems Maven proxies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This ivery simplistic code example illustrates that Groovy Grapes suffers from the same problem | |
@GrabResolver('http://rubygems.lasagna.io/proxy/maven/releases/') | |
@Grab('rubygems:colorize:0.7.6@gem') | |
import java.io.File | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ivyAnt = new AntBuilder() | |
ivyAnt.taskdef name: "testConfigure", | |
classname: 'org.apache.ivy.ant.IvyConfigure' | |
ivyAnt.taskdef name: "testResolve", | |
classname: 'org.apache.ivy.ant.IvyResolve' | |
File root = new File('FOO') | |
File cache = new File(root,'cache') | |
File resolution = new File(root,'resolution') | |
File cfg = new File(root,'test-ivysettings.xml') | |
root.mkdirs() | |
cfg.text = """<ivysettings> | |
<settings defaultResolver='foo'/> | |
<caches defaultCacheDir='${cache.absolutePath}' | |
artifactPattern='[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])' | |
ivyPattern='[organisation]/[module]/[revision]/ivy-[revision].xml' | |
resolutionCacheDir='${resolution.absolutePath}'/> | |
<resolvers> | |
<chain name="foo" returnFirst="true"> | |
<ibiblio name='rubygems' m2compatible='true' root='http://rubygems.lasagna.io/proxy/maven/releases'/>" | |
</chain> | |
</resolvers> | |
</ivysettings> | |
""" | |
ivyAnt.testConfigure file : cfg.absolutePath | |
ivyAnt.testResolve ( | |
inline : true, | |
organisation: 'rubygems', module: 'colorize', revision: '0.7.7', | |
transitive:true, | |
type : '*', | |
conf : '*' | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment