I'm having a problem with the TestNG dependency resolving.
TestNG comes in two flavours jdk15 and jdk14 to use this with the
flatDirResolver you would expect to put the following in your build file:
dependencies {
addFlatDirResolver('lib',new File(rootDir, 'lib')) // uses
[artifact](-[revision])(-[classifier]).[ext]
testCompile "testng:testng:5.8:jd...@jar"
}
lib dir contents:
lib/testng-5.8-jdk15.jar
I expected this to work but it doesn't Ivy didn't try any filename with the
artifact classifier.
I ended up doing the folowing:
dependencies {
File libDir = new File(rootDir, '../lib')
addFlatDirResolver('lib',libDir).addArtifactPattern(new
File(libDir.absolutePath,
'[artifact]-[revision]-[conf].[ext]').absolutePath)
clientModule(['testCompile'],'testng:testng:5.8:jdk15') {
Artifact testngArtifact = new Artifact('testng','jar','jar',null,
null)
testngArtifact.setConfs(['jdk15'])
addArtifact(testngArtifact)
}
}
I checked our source and the classifier is passed to Ivy as extra
attributes, but it doesn't get picked up. I don't know the [classifier]
pattern element yet can somebody explain this element? is this the same as
[conf]? or should it get mapped to [conf]? Has anybody else run into this?
Tom