问题
I would like to add a library that I am going to use within the code of my SBT-Plugin.
I did
...
sbtPlugin := true
libraryDependencies += "..." %% "..." % "..."
enablePlugins(SbtPlugin)
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}
scriptedBufferLog := false
...
in build.sbt
located in the root of my plugin project.
▶ tree -L 1
.
├── README.md
├── build.sbt <- this one
├── project
└── src
But when I run the test, following: https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins.html .
I run
sbt 'set isSnapshot := true' scripted
And I am getting
java.lang.NoClassDefFoundError
with some class coming from the library I added.
Am I doing something wrong ?
来源:https://stackoverflow.com/questions/55895632/how-can-i-add-a-dependency-to-my-sbt-plugin