Hello, I tried to use the plugin like this
import com.amazonaws.auth._ lazy val root = (project in file(".")).settings( name := "helpers", version := "0.6.0", scalaVersion := "2.10.6", organization := "net.pishen", libraryDependencies ++= Seq( "com.typesafe.play" %% "play-json" % "2.3.10", "com.github.nscala-time" %% "nscala-time" % "2.6.0" ), publishMavenStyle := false, s3credentials := new EnvironmentVariableCredentialsProvider(), s3region := Region.fromValue("us-west-2"), publishTo := Some(s3resolver.value("S3 Repository", s3("my-bucket")).withIvyPatterns) )
But it said that it can't find the value
error: not found: value Region s3region := Region.fromValue("us-west-2"), ^ sbt.compiler.EvalException: Type error in expression at sbt.compiler.Eval.checkError(Eval.scala:384) at sbt.compiler.Eval.compileAndLoad(Eval.scala:183) at sbt.compiler.Eval.evalCommon(Eval.scala:152) at sbt.compiler.Eval.evalDefinitions(Eval.scala:122) at sbt.EvaluateConfigurations$.evaluateDefinitions(EvaluateConfigurations.scala:271) at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:109) at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712) at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717) ...
And if I add this line
import com.amazonaws.services.s3.model._ to my
build.sbt it will work. Seems that it can't see the type aliases in autoImport?
@/all v0.17.0 is out:
@/all Thanks to the effort of Michael Ahlers @michaelahlers, we've got a new bugfix release that workarounds the problem with redundant delimiters in the ivy-style patterns introduced in sbt 1.0 (see #52 and sbt/sbt#3573).
Everybody is recommended to update to v0.17.1
Option[S3ACL]: when it's unset, artifacts will be published inheriting the bucket ACL
resolvers += "Era7 maven releases" at "https://s3-eu-west-1.amazonaws.com/releases.era7.com" addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.16.0")
scalaVersion := "2.12.3", I guess, you have it in your
build.sbt, which is irrelevant for the plugin. Scala version which is used for the plugins is determined by the version of sbt:
I'm facing problems with resolving dependencies from S3.
~/.aws/config like this:
[default] region = eu-central-1 output = json [my-project] region = eu-central-1
~./aws/credentials like this
[my-project] aws_access_key_id = A... aws_secret_access_key = X...
(I also tried to add empty [default] section here.
aws s3 ls s3://releases.my-project.io/some-ivy-file.ivy --profile my-project returns me list of files.
sbt can't resolve deps.
I also tried to
export AWS_PROFILE=my-project without any luck.
Any suggestions? Thanks in advance
awsProfilesetting affected only credentials, not the region (hence, as @michaelahlers says, you have to set the region explicitly). In the newer versions it has been fixed, but it's available only for sbt-1.x
aws s3 cp
Thank you very much @laughedelic , I understand now and I will use this plugin, but for more information detail, I would like to know why is this, maybe it is because SBT expects a dependency server configured as a dependency management like artifactory, and S3 it's obviusly not configured as a dependency management out of the box?
Thanks in advance
project/build.properties) or use an older version of this plugin (not recommended). See the installation docs.