Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the plugins are available in build.sbt, so I can't use enablePlugins() on them there #516

Closed
2rs2ts opened this issue Mar 6, 2015 · 4 comments

Comments

@2rs2ts
Copy link

2rs2ts commented Mar 6, 2015

I've been upgrading one of my projects from 0.8 to 1.0, but when I try to enable any of the native packager plugins, I always get error: not found: value <whatever plugin>. I was able to successfully enable the plugins in Build.scala but not in build.sbt. I am using sbt 0.13.7 which I downloaded from homebrew, and version 1.0.0-RC1 of this plugin.

Example build.sbt:

scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature")

enablePlugins(RpmPlugin) // this didn't work

My plugins.sbt:

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2")

addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.8")

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")

addSbtPlugin("com.github.sdb" % "xsbt-filter" % "0.4")

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.6.0")

addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.5")

addSbtPlugin("com.paypal" % "horizon" % "0.1.4" exclude("org.scala-sbt", "sbt"))

addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")

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

I was able to enable the plugins by doing something like this in my Build.scala:

import com.typesafe.sbt.packager.rpm.RpmPlugin
// lots of stuff in between there and here
lazy val myproject = Project(
  "myproject", file("myproject"),
  settings = mySettings ++ Seq(name := "myproject", ...)
).enablePlugins(RpmPlugin)

The docs said to just add the line in build.sbt. Is this a documentation error?

@kardapoltsev
Copy link
Member

Excuse me, I was wrong.

@muuki88
Copy link
Contributor

muuki88 commented Mar 6, 2015

Nope. This should work out of the box. Can you provide a minimal example reproducing this?

@2rs2ts
Copy link
Author

2rs2ts commented Mar 8, 2015

@muuki88 I will be glad to do so when I have some time or when we open source this project, whichever comes first.

@muuki88
Copy link
Contributor

muuki88 commented Apr 17, 2015

AutoPlugins don't work with Build.scala

@muuki88 muuki88 closed this as completed Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants