简体   繁体   中英

How do I test a change to an sbt plugin? Resolver semantics

tl;dr How do I test a change to an sbt plugin (eg, sbt-native-packager)?

I git clone sbt-native-packager , tweak it, and publishLocal to ~/.ivy2/local .

My MWE sbt project is like:

./project
./project/build.properties
./project/plugins.sbt
./project/project/build.properties
./project/project/build.sbt

where

both build.properties files say sbt.version=0.13.15

the project/plugins.sbt says

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.5")

and project/project/build.sbt says

resolvers += Resolver.file("ivy-local", file(sys.props("user.home")) / ".ivy2" / "local")(Resolver.ivyStylePatterns)

But no matter how I permute things, sbt update always downloads the remote sbt-native-packager jar into ~/.ivy2/cache instead of getting same from ~/.ivy2/local

I sbt publishLocal the plugin with random-unique-version-SNAPSHOT and have my main project addSbtPlugin that version.

Citation: @MateuszKubuszok

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM