In Build.scala I have a dependency between projects:
val coreLib = Projects.coreLib()
val consoleApp = Projects.consoleApp().dependsOn(coreLib)
val androidApp = Projects.androidProject().dependsOn(coreLib/*, exclusions = xpp */)
Core library project defines a library in its libraryDependencies (XPP parser), which I want to exclude in androidApp, since Android framework have its own XPP implementation out of the box.
How can I exclude XPP library from transitive dependencies of coreLib in androidApp project?
EDIT:
According to my research exclusion is possible ONLY to ModuleID which is used in conjunction with libraryDependency. Meanwhile dependsOn puts all transitive dependencies to classpath, there is no way in api to exclude some transitive dependencies of this project, you dependsOn
DETAILS:
I'm running sbt 0.13.5 currently.
libraryDependencies of commonLib as well as it various settings supplied in build.sbt so that this project could be reused as standalone, and because it feels right and natural way of supplying settings in sbt.
This appears to work for me:
val someApp = project.settings(
libraryDependencies += "junit" % "junit" % "4.11"
)
val androidApp = project.dependsOn(someApp).settings(
projectDependencies := {
Seq(
(projectID in someApp).value.exclude("junit", "junit")
)
}
)
What the projectDepenendencies is doing is what sbt, by default, attempts to do. It converts any inter-project dependencies into ModuleIDs which Ivy will use during resolution. Because the Project API has no way to specify excludes currently, we bypass this automatic layer and manually declare the Ivy dependency as well.
Result:
> show someApp/update
...
[info] Update report:
...
[info] compile:
[info] org.scala-lang:scala-library:2.10.4 (): (Artifact(scala-library,jar,jar,None,List(),None,Map()),/home/jsuereth/.sbt/boot/scala-2.10.4/lib/scala-library.jar)
[info] junit:junit:4.11: (Artifact(junit,jar,jar,None,ArraySeq(master),None,Map()),/home/jsuereth/.ivy2/cache/junit/junit/jars/junit-4.11.jar)
[info] org.hamcrest:hamcrest-core:1.3: (Artifact(hamcrest-core,jar,jar,None,ArraySeq(master),None,Map()),/home/jsuereth/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar)
...
And the dependent project with junit/hamcrest excluded:
> show androidApp/update
...
[info] Update report:
...
[info] compile:
[info] org.scala-lang:scala-library:2.10.4 (): (Artifact(scala-library,jar,jar,None,List(),None,Map()),/home/jsuereth/.sbt/boot/scala-2.10.4/lib/scala-library.jar)
[info] someapp:someapp_2.10:0.1-SNAPSHOT:
...
Related
I have an SBT multiproject structure, but for some reason sbt does not recognize the unmanaged jar when tests are run. The objective is to have a stub subproject without an actual implementation and add this as a "Provided" dependency to the Main class, it should detect the jars in the /lib folder when provided. The actual implementation in the .jar file simply prints a random string.
Here is the project structure.
./MainClass
./MainClass/lib/printsomethingexample_2.13-0.1.0-SNAPSHOT.jar
./MainClass/src/test/scala/Main.scala
./MainClass/src/main/scala/Main.scala
./stub/lib/printsomethingexample_2.13-0.1.0-SNAPSHOT.jar
./stub/src/main/scala/test/stub/Example.scala
./build.sbt
File main/scala/Main.scala
import test.stub.Example
object Main extends App {
Example.printSomething()
}
File test/scala/Main.scala
import org.scalatest.flatspec._
import test.stub.Example
class Main extends AnyFlatSpec {
"Unmanaged jar" should "work" in {
Example.printSomething()
}
}
scala/test/stub/Example.scala:
package test.stub
object Example {
def printSomething(): Unit = ???
}
build.sbt:
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.13.10"
lazy val root = (project in file("."))
.settings(
name := "stubExample"
).aggregate(MainClass, stub)
lazy val stub = project
.in(file("stub"))
.settings(
name := "stub"
)
lazy val MainClass = project
.in(file("MainClass"))
.settings(
name := "MainClass",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.14" % Test,
).dependsOn(`stub` % Provided)
When I run sbt "MainClass/runMain Main" it finds the unmanaged jars as expected and prints the string, but when I run sbt "MainClass/test" I get the following error:
[info] Main:
[info] Unmanaged jar
[info] - should work *** FAILED ***
[info] scala.NotImplementedError: an implementation is missing
Does anyone understand why the jars are not found?
*** EDIT ***
Here is the output of sbt "MainClass/runMain Main"
▶ sbt "MainClass/runMain Main"
[info] welcome to sbt 1.6.2 (Azul Systems, Inc. Java 1.8.0_312)
[info] loading global plugins from /Users/riccardo/.sbt/1.0/plugins
[info] loading project definition from /Users/riccardo/Documents/Projects/stubExample/project
[info] loading settings for project root from build.sbt ...
[info] set current project to stubExample (in build file:/Users/riccardo/Documents/Projects/stubExample/)
[info] running Main
Printed Something
The .jar has an implementation of test.stub.Example#printSomething (It is a different project)
package test.stub
object Example {
def printSomething(): Unit = println("Printed Something")
}
My expectation is that since the stub subproject is marked as Provided it should use the printSomething implementation from the jar in the classpath instead of the stub subproject, the stub subproject was marked as Provided and would expect it to be excluded from the classpath (maybe I don't understand how Provided works).
This behavior happens when running the main class as shown above, it uses the printSomething from the classpath in lib/printsomethingexample_2.13-0.1.0-SNAPSHOT.jar instead of using the stub that is not implemented. In my real life scenario, I need the dependency on the stub subproject.
If I remove the dependsOn the sbt test step works, but the project wouldn't compile without the unmanaged jars in the /lib folder, hence why we use a stub subproject as dependecy, just to make the project compile.
I have a project which I publish locally to my .m2 directory as a plugin, which later I need to import into a different Scala project and use it.
It seems like the publishing step is executed correctly.
The build.sbt file of the plugin project looks like this:
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin)
.settings(
name := "pluginName",
organization := "com.myOrg",
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.4.6" // set minimum sbt version
}
}
)
resolvers += "confluent" at "https://packages.confluent.io/maven"
libraryDependencies ++= Seq(
"io.confluent" % "kafka-schema-registry-client" % "7.0.1"
// some other dependemcies
)
After running the compile and publishLocal commands in sbt shell I get the next message:
[info] delivering ivy file to /Users/me/Work/repos/external/pluginName/target/scala-2.12/sbt-1.0/ivy-1.0.0.xml
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/poms/pluginName.pom
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/jars/pluginName.jar
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/srcs/pluginName-sources.jar
[info] published pluginName to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/docs/pluginName-javadoc.jar
[info] published ivy to /Users/me/.ivy2/local/com.myOrg/pluginName/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
[success] Total time: 0 s, completed 3 Jan 2022, 10:07:43
In order to import/install this plugin in the other Scala project, I have added the next line to the plugins.sbt file: addSbtPlugin("com.myOrg" % "pluginName" % "1.0.0")
I also added libs-release-local and libs-snapshot-local to the externalResolvers section in the buid.sbt file.
After reloading and compiling the project I received this error:
[error] (update) sbt.librarymanagement.ResolveException: Error downloading io.confluent:kafka-schema-registry-client:7.0.1
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/io/confluent/kafka-schema-registry-client/7.0.1/kafka-schema-registry-client-7.0.1.pom
[error] not found: /Users/me/.ivy2/local/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
[error] not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
[error] not found: https://repo.typesafe.com/typesafe/ivy-releases/io.confluent/kafka-schema-registry-client/7.0.1/ivys/ivy.xml
I am kind of new to Scala and I don't understand what and I doing wrong.
Can anyone shed some light on this problem?
You're publishing to your local Maven cache, but sbt uses Ivy.
Try removing the publishTo setting, it shouldn't be needed. Just use the publishLocal task to publish to your local Ivy cache.
I have a built.sbt that references a child project's main class as its own main class:
lazy val akka = (project in file("."))
.aggregate(api)
.dependsOn(api)
.enablePlugins(JavaAppPackaging)
lazy val api = project in file("api")
scalaVersion := "2.11.6"
// This is referencing API code
mainClass in (Compile, run) := Some("maslow.akka.cluster.node.ClusterNode")
artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
s"""${artifact.name}.${artifact.extension}"""
}
name in Universal := name.value
packageName in Universal := name.value
However, each time I run sbt run I get the following error:
> run
[info] Updating {file:/Users/mark/dev/Maslow-Akka/}api...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Updating {file:/Users/mark/dev/Maslow-Akka/}akka...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Running maslow.akka.cluster.node.ClusterNode
[error] (run-main-0) java.lang.ClassNotFoundException: maslow.akka.cluster.node.ClusterNode
java.lang.ClassNotFoundException: maslow.akka.cluster.node.ClusterNode
at java.lang.ClassLoader.findClass(ClassLoader.java:530)
As I've been doing some research into the problem, I first switched to the project to api from akka and then opened up console. From there, it can't find the maslow package even though it most certainly exists. After that, I went into the api folder and ran sbt console and it accessed the aforementioned package just fine. After I do this, sbt run from the akka project works. Why?
The folder api is pulled in via git read-tree. There shouldn't be anything special about it. I'm using sbt 0.13.5
I think in a multi-project build a global line such as
mainClass in (Compile, run) := ...
will just be swallowed without consequences, as it doesn't refer to any project.
Probably the following works:
mainClass in (Compile, run) in ThisBuild := ...
Or you add it to the root project's settings:
lazy val akka = (project in file("."))
.aggregate(api)
.dependsOn(api)
.enablePlugins(JavaAppPackaging)
.settings(
mainClass in (Compile, run) := ...
)
The problem was this line: lazy val api = project in file("api")
From the docs:
When defining a dependency on another project, you provide a ProjectReference. In the simplest case, this is a Project object. (Technically, there is an implicit conversion Project => ProjectReference) This indicates a dependency on a project within the same build.
This indicates a dependency within the same build. Instead, what I needed was to use RootProject since api is an external build:
It is possible to declare a dependency on a project in a directory separate from the current build, in a git repository, or in a project packaged into a jar and accessible via http/https. These are referred to as external builds and projects. You can reference the root project in an external build with RootProject:
In order to solve this problem, I removed the project declarations out of build.sbt into project/Build.scala:
import sbt._
object MyBuild extends Build {
lazy val akka = Project("akka", file(".")).aggregate(api).dependsOn(api)
lazy val api = RootProject(file("api"))
}
To be clear, the problem was that my api sub-project was a ProjectRef and not a RootProject.
I have two sbt plugin projects that both use multi-project builds. I would like to use one of the plugins as a dependency for the other. I was able to get this working with single project builds, but once I move to the multi-project build, I can't seem to get the dependencies to link up correctly.
my-test-plugin
build.sbt
lazy val commonSettings = Seq(
organization := "com.example",
name := "my-test-plugin",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.10.5"
)
// The contents of root are largely unimportant here
lazy val root = (project in file(".")).settings(commonSettings: _*)
lazy val plugin = (project in file("plugin"))
.settings(commonSettings: _*)
.settings(
sbtPlugin := true
)
my-test-plugin/plugin/src/main/scala/PluginTest.scala
package com.example.test
// Sample code I would like to access from another plugin
object PluginTest {
def foo: Unit = println("test")
}
my-sub-plugin
build.sbt
lazy val commonSettings = Seq(
organization := "com.sample",
name := "my-sub-plugin",
version := "0.1.0-SNAPSHOT",
scalaVersion := "2.10.5"
)
lazy val root = (project in file(".")).settings(commonSettings: _*)
lazy val plugin = (project in file("plugin"))
.settings(commonSettings: _*)
.settings(
sbtPlugin := true,
libraryDependencies += Defaults.sbtPluginExtra("com.example" % "my-test-plugin" % "0.1.0-SNAPSHOT", "0.13", "2.10")
).dependsOn(root)
my-sub-plugin/plugin/src/main/scala/SubPluginTest.scala
package com.sample.test
object SubPluginTest {
def bar = com.example.test.PluginTest.foo
}
But the last file doesn't compile:
[error] /home/mike/code/sbt-tests/my-sub-plugin/plugin/src/main/scala/SubPluginTest.scala:4: object example is not a member of package com
[error] def bar = com.example.test.PluginTest.foo
[error] ^
When I publish-local and plugin/publish-local both projects (rather, just compile the second), the artifacts resolve correctly, but SubPlugintest.scala fails to compile with the above error, as if the dependency isn't there. However, if I remove the root projects and put the plugin files in root (without lazy vals or anything, just a flat build.sbt structure), it works.
What am I missing here?
I don't think it's relevant, but I tried 0.13.5 and 0.13.8. I've also fruitlessly tried adding the dependency without sbtPluginExtra, and putting them in plugins.sbt as well (I didn't think that would work, but hey).
Edit:
The dependency jars appear exist locally and resolve correctly:
$ jar tf ~/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/jars/my-test-plugin.jar
META-INF/MANIFEST.MF
com/
com/example/
com/example/test/
com/example/test/PluginTest$.class
com/example/test/PluginTest.class
$ jar tf ~/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/jars/my-test-plugin_2.10.jar
META-INF/MANIFEST.MF
com/
com/example/
com/example/test/
com/example/test/DummyCode.class
com/example/test/DummyCode$.class
You're not setting a distinct name for each module:
my-test-plugin
> ;show root/name ;show plugin/name
[info] my-test-plugin
[info] my-test-plugin
my-sub-plugin
> ;show root/name ;show plugin/name
[info] my-sub-plugin
[info] my-sub-plugin
As you can see, publishing in my-test-plugin works:
> ;root/publishLocal ;plugin/publishLocal
[info] Wrote /Users/dnw/Desktop/sbt-tests/my-test-plugin/target/scala-2.10/my-test-plugin_2.10-0.1.0-SNAPSHOT.pom
[info] :: delivering :: com.example#my-test-plugin_2.10;0.1.0-SNAPSHOT :: 0.1.0-SNAPSHOT :: integration :: Sat Apr 11 09:16:15 BST 2015
[info] delivering ivy file to /Users/dnw/Desktop/sbt-tests/my-test-plugin/target/scala-2.10/ivy-0.1.0-SNAPSHOT.xml
[info] published my-test-plugin_2.10 to /Users/dnw/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/poms/my-test-plugin_2.10.pom
[info] published my-test-plugin_2.10 to /Users/dnw/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/jars/my-test-plugin_2.10.jar
[info] published my-test-plugin_2.10 to /Users/dnw/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/srcs/my-test-plugin_2.10-sources.jar
[info] published my-test-plugin_2.10 to /Users/dnw/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/docs/my-test-plugin_2.10-javadoc.jar
[info] published ivy to /Users/dnw/.ivy2/local/com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/ivys/ivy.xml
[success] Total time: 0 s, completed 11-Apr-2015 09:16:15
[info] Wrote /Users/dnw/Desktop/sbt-tests/my-test-plugin/plugin/target/scala-2.10/sbt-0.13/my-test-plugin-0.1.0-SNAPSHOT.pom
[info] :: delivering :: com.example#my-test-plugin;0.1.0-SNAPSHOT :: 0.1.0-SNAPSHOT :: integration :: Sat Apr 11 09:16:15 BST 2015
[info] delivering ivy file to /Users/dnw/Desktop/sbt-tests/my-test-plugin/plugin/target/scala-2.10/sbt-0.13/ivy-0.1.0-SNAPSHOT.xml
[info] published my-test-plugin to /Users/dnw/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/poms/my-test-plugin.pom
[info] published my-test-plugin to /Users/dnw/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/jars/my-test-plugin.jar
[info] published my-test-plugin to /Users/dnw/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/srcs/my-test-plugin-sources.jar
[info] published my-test-plugin to /Users/dnw/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/docs/my-test-plugin-javadoc.jar
[info] published ivy to /Users/dnw/.ivy2/local/com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/ivys/ivy.xml
[success] Total time: 0 s, completed 11-Apr-2015 09:16:15
But note the publish paths:
com.example/my-test-plugin_2.10/0.1.0-SNAPSHOT/jars/my-test-plugin_2.10.jar
com.example/my-test-plugin/scala_2.10/sbt_0.13/0.1.0-SNAPSHOT/jars/my-test-plugin.jar
A non-sbt-plugin called my-test-plugin cross-built for Scala 2.10.
An sbt-plugin called my-test-plugin, cross-built for Scala 2.10 and sbt 0.13.
This has an impact when trying to resolve my-test-plugin in my-sub-plugin:
[error] Modules were resolved with conflicting cross-version suffixes in {file:/Users/dnw/Desktop/sbt-tests/my-sub-plugin/}root:
[error] com.example:my-test-plugin <none>, _2.10
java.lang.RuntimeException: Conflicting cross-version suffixes in: com.example:my-test-plugin
at scala.sys.package$.error(package.scala:27)
at sbt.ConflictWarning$.processCrossVersioned(ConflictWarning.scala:46)
at sbt.ConflictWarning$.apply(ConflictWarning.scala:32)
Try and specify different names for each module and it should work.
Here below is my multi-project structure:
myApp
+ build.sbt
+ sub-prj-1
+ build.sbt
+ sub-prj-2
+ build.sbt
+ project
+ Build.scala
I use to define common settings in project/Build.scala like this:
import sbt._
import Keys._
object ApplicationBuild extends Build {
val defaultScalacOptions = Seq(
"-unchecked", "-deprecation", "-feature", "-language:reflectiveCalls", "-language:implicitConversions",
"-language:postfixOps", "-language:dynamics", "-language:higherKinds", "-language:existentials",
"-language:experimental.macros", "-encoding", "UTF-8", "-Xmax-classfile-name", "140")
val defaultResolvers = Seq(
"Typesafe releases repository" at "http://repo.typesafe.com/typesafe/releases/"
)
val defaultSettings = Defaults.defaultSettings ++ Seq(
scalaVersion := "2.10.4",
scalacOptions ++= defaultScalacOptions,
resolvers ++= defaultResolvers
)
}
... and then I reference these common settings in each build.sbt file:
name := "myapp"
organization := "Test, Inc."
version := "1.0"
ApplicationBuild.defaultSettings // it looks like common settings defined in
// project/Build.scala are not read...
scalacOptions += "-feature" // already defined in ApplicationBuild.defaultSettings...
// but if I don't define it here, it doesn't work
lazy val `sub-prj-1` = project.in(file("sub-prj-1"))
lazy val `sub-prj-2` = project.in(file("sub-prj-2"))
lazy val brix = project.in(file(".")).settings(
publishArtifact := false
).aggregate(
`sub-prj-1`,
`sub-prj-2`
)
For example, scalacOptions += "-feature" is already defined in Build.scala... but if I don't define it in build.sbt I always get the following warning:
[warn] there were 1 deprecation warning(s); re-run with -deprecation for details
[warn] one warning found
Any idea? Am I missing something? This problem first appeared after I installed sbt 0.13.5.
EDIT
Here's the content of scalacOptions:
[info] sub-prj-1/*:scalacOptions
[info] List(-unchecked, -deprecation, -feature, -language:reflectiveCalls, -language:implicitConversions, -language:postfixOps, -language:dynamics, -language:higherKinds, -language:existentials, -language:experimental.macros, -encoding, UTF-8, -Xmax-classfile-name, 140)
[info] sub-prj-2/*:scalacOptions
[info] List(-unchecked, -deprecation, -feature, -language:reflectiveCalls, -language:implicitConversions, -language:postfixOps, -language:dynamics, -language:higherKinds, -language:existentials, -language:experimental.macros, -encoding, UTF-8, -Xmax-classfile-name, 140)
[info] myapp/*:scalacOptions
[info] List(-unchecked, -deprecation, -feature, -language:reflectiveCalls, -language:implicitConversions, -language:postfixOps, -language:dynamics, -language:higherKinds, -language:existentials, -language:experimental.macros, -encoding, UTF-8, -Xmax-classfile-name, 140)
I can only guess (and counting on additional information to be corrected when mistaken), but the warn messages are from the build project (under project) not yours.
I'm on sbt 0.13.6-SNAPSHOT (built from the sources today) so your mileage may vary.
➜ myApp xsbt
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/common-settings/myApp/project
[info] Updating {file:/Users/jacek/sandbox/common-settings/myApp/project/}myapp-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/jacek/sandbox/common-settings/myApp/project/target/scala-2.10/sbt-0.13/classes...
[warn] there were 1 deprecation warning(s); re-run with -deprecation for details
[warn] one warning found
[info] Set current project to brix (in build file:/Users/jacek/sandbox/common-settings/myApp/)
When I tried to reproduce your case, I ended up with the messages coming for the build definition under project:
[warn] there were 1 deprecation warning(s); re-run with -deprecation for details
[warn] one warning found
Are they what you want to get rid of? If so, read on. Else add additional information to your question. Thanks.
For sbt is recursive, what's beneath project is another build definition (and so on).
In order to get rid of the messages, you should follow their advice and add -deprecation to the build definition of the corresponding project. Add the following to project/build.sbt:
scalacOptions += "-deprecation"
With this, reload and the mystery becomes uncovered.
➜ myApp xsbt
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/common-settings/myApp/project
[info] Compiling 1 Scala source to /Users/jacek/sandbox/common-settings/myApp/project/target/scala-2.10/sbt-0.13/classes...
[warn] /Users/jacek/sandbox/common-settings/myApp/project/Build.scala:15: value defaultSettings in object Defaults is deprecated: 0.13.2
[warn] val defaultSettings = Defaults.defaultSettings ++ Seq(
[warn] ^
[warn] one warning found
[info] Set current project to brix (in build file:/Users/jacek/sandbox/common-settings/myApp/)
>
As sbt.Defaults says:
#deprecated("0.13.2", "Default settings split into `coreDefaultSettings` and IvyModule/JvmModule plugins.")
To fix this, one should read the article Preview of upcoming sbt 1.0 features: Read about the new plugins.