In my SBT build, I'm fetching a zip dependency (previously built with the sbt-native-packager plugin), published in my local Ivy repo with a bundle
classifier.
But I need the dependency path in the Ivy repo, in order to unzip it (with IO.unzip
), put some files in it and repackage it with sbt-native-packager.
I'm using the artifacts(...)
method to find the artifact and add it as a dependency :
"foo" % "bar" % "1.0-SNAPSHOT" artifacts(Artifact("bar-bundle", "zip", "zip", "bundle"))
But after that, I'm a bit lost...
I tried to filter out the dependencyClasspath
to find it :
val bundleFile = taskKey[File]("bundle's path")
val settings = Seq(bundleFile <<= dependencyClasspath map { _ filter (_.endsWith(".zip"))})
Trouble is : I can't find the zip dependency in any classpath... What I'm doing wrong ?
I'm using sbt 0.13.