Closed phillro closed 10 years ago
@phillro what do you mean by a plugin stored in s3? could you explain it more detailed, please?
Sure. I have a custom sbt plugin. We have published it to s3.
I'm having some trouble configuring the plugin.sbt file to be able to resolve s3 repos, given it also has to add the s3 resolver plugin.
On Thu, Jan 30, 2014 at 5:32 PM, Alexey Alekhin notifications@github.comwrote:
@phillro https://github.com/phillro what do you mean by a plugin stored in s3? could you explain it more detailed, please?
Reply to this email directly or view it on GitHubhttps://github.com/ohnosequences/sbt-s3-resolver/issues/18#issuecomment-33741875 .
ah, ok, so you need sbt-s3-resolver plugin to resolve a plugin that is published itself in s3.
as you maybe know, sbt project structure is recursive, so for adding sbt-s3-resolver to the "meta-project" you should go to (or create) project/project/plugins.sbt
and add there sbt-s3-resolver, as described in readme. this way, you meta-project should be able to resolve a plugin, which is published in s3 (don; forget to add necessary mave or ivy resolvers for it).
if it doesn't work, please, show us your project structure and all sbt-config files, so that we can help you directly.
and don't forget about setting credentials! ") (if needed)
thx!
On Thu, Jan 30, 2014 at 5:42 PM, Alexey Alekhin notifications@github.comwrote:
and don't forget about setting credentials! ")
Reply to this email directly or view it on GitHubhttps://github.com/ohnosequences/sbt-s3-resolver/issues/18#issuecomment-33742792 .
Closing this. @phillro, if you still have problems, let me know :wink:
@laughedelic, I have a plugin in which I want to access sbt-s3-resolver
functionality. I've added
resolvers += "Era7 maven releases" at "http://releases.era7.com.s3.amazonaws.com"
addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.14.0")
to project/project/plugins.sbt
like you said above and I'm trying to reference the plugin (import ohnosequences.sbt.SbtS3Resolver._
) in project's source code (in src/main/scala
), but it can't find it.
What am I doing wrong?
Hi @Tvaroh. I think it's not related to this issue, if I understood your right.
To use sbt-s3-resolver from another plugin, you should add those lines to your plugin's build.sbt
, not project/...
.
If you always want to add sbt-s3-resolver to projects with your plugin, you use addSbtPlugin
(just as you wrote), but if you only want to use its functionality from your plugin, you can use it as a normal library dependency:
resolvers += "Era7 maven releases" at "http://releases.era7.com.s3.amazonaws.com"
libraryDependencies += "ohnosequences" % "sbt-s3-resolver" % "0.14.0"
@laughedelic thanks for the help, it does work. :+1:
@Tvaroh, you're welcome 😉 I'm curious, which plugin are you working on?
@laughedelic sorry for late response. It's just a plugin containing common sbt stuff for projects in my organization.
How would one load both sbt-s3-resolver plugin and a plugin that is itself stored in s3?