Closed jastice closed 5 years ago
perhaps it works if you publish and resolve from a local file ivy repository?
What worked:
in plugin: publishMavenstyle := true
in project: `resolvers += "localtrix" at "file:///Users/jast/repo/localtrix"
(semi-related https://github.com/sbt/librarymanagement/issues/224)
Furthermore, publishing and resolving with explicit Resolver.ivyStylePatterns
works:
publishTo := Some(Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))(Resolver.ivyStylePatterns))
resolvers += Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))(Resolver.ivyStylePatterns)
so this is exactly sbt/librarymanagement#224
if you publish maven style (which is the default) then Resolver.file
doesn't work but "localtrix" at "file:///.."
(aka MavenRepository
) does.
if you publish maven style (which is the default) then Resolver.file doesn't work but "localtrix" at "file:///.." (aka `MavenRepository) does.
ok so I am closing this.
steps
I am trying to publish an sbt plugin to a local file repo. In the plugin's build.sbt I have:
I run the
publish
task and it gets published fine to/Users/jast/repo/localtrix/org/me/sbt-plugin_2.12_1.0/1.2.3
In another project, I want to resolve this plugin. in
project/plugins.sbt
I have:problem
I try to run sbt in the this project and I get:
The sbt plugin fails to resolve. Of note: it reports
localtrix: tried
but does not actually report the url it tried.Relevant code in ivy's reporter: https://github.com/sbt/ivy/blob/2.3.x-sbt/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java#L796-L800
expectation
The sbt plugin resolves
notes
publishLocal
and resolving from.ivy2/local
works, but I want to be able to publish to a repo that I can copy to another machine without messing with that directory.sbt version: insert sbt version