Questions tagged [sbt-plugin]

A plugin extends the build definition, most commonly by adding new settings. The new settings could be new tasks. For example, a plugin could add a codeCoverage task which would generate a test coverage report.

An SBT plugin extends the build definition, most commonly by adding new settings. The new settings could be new tasks. For example, a plugin could add a codeCoverage task which would generate a test coverage report.

192 questions
1
vote
1 answer

SBT / Scala - Execute tests in order

We are running "sbt test" to execute our tests on multiple projects. But we now have tests which need to execute in a specific order. So first all tests with @attributeX and after all these tests are completed we want to execute every test which…
Josjr87
  • 193
  • 1
  • 13
1
vote
1 answer

Typesafe Play sbt-plugin version 2.8.7 missing from maven repo1

My build started failing about an hour ago with this error: [error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:sbt-plugin;sbtVersion=1.0;scalaVersion=2.12:2.8.7 [error] Not found [error] Not found …
Rob
  • 126
  • 9
1
vote
1 answer

How can I add a Task dependency on a task from another plugin to my SBT plugin?

I am writing a Plugin for SBT that will generate the configuration files needed to create an Azure Function from a Scala program. My efforts are on github (https://github.com/code-star/sbt-azure-functions-plugin/tree/develop), and as can be read in…
JeanMarc
  • 306
  • 1
  • 10
1
vote
0 answers

Is there a way to let custom sbt plugin discover which platform a Scala project targets?

I would like to develop an sbt-plugin that would auto-generate sources for Scala projects. The thing is I would like to produce slightly different sources for each targeted platform (JVM, Native, Scala.js). Because of that, my plugin needs to detect…
przemod
  • 459
  • 3
  • 10
1
vote
2 answers

SBT Plugin Where is %%% defined?

I have an SBT plugin which will auto-generate some Scala.js code just before compile time. This code depends on a library which I would like to automatically include when the plugin is enabled. This compiles and runs, but does not get the Scala.js…
Thomas
  • 871
  • 2
  • 8
  • 21
1
vote
1 answer

sbt unable to import two elasticsearch libraries of different version in project

I am trying to connect with two elasticsearch clusters using scala code and query elasticsearch from them. using following libraries and code in build.sbt of scala project: libraryDependencies +="org.elasticsearch" % "elasticsearch" %…
1
vote
1 answer

SBT download error for ivy.xml although it exists

SBT: [error] download error: Caught java.net.SocketException: Connection reset (Connection reset) while downloading for example on…
user11224753
  • 21
  • 1
  • 1
1
vote
0 answers

Conditional multi projects builds using sbt

I have multiple projects set up in a repo. Example - -root -project a -project b -project c -build.sbt Currently I am publishing all the projects separately, and as an assembled jar (containing all the projects). Can I do something…
saumj
  • 171
  • 1
  • 2
  • 11
1
vote
1 answer

Make a SBT subproject task depends on another subproject task

I have 2 sbt subproject, one is a CLI, one is a sbt plugin. The sbt plugin will try to download at execution time the CLI. We have an implicit dependency here. The tests for the sbt plugin (implemented thanks to the sbt-scripted plugin) requires the…
tibo
  • 5,326
  • 4
  • 37
  • 53
1
vote
0 answers

Publish a SBT plugin exposing librairies in Scala 2.13

I order to publish JGiven reports using my Scalatests, in currently use https://github.com/seblm/sbt-jgiven-scalatest-reporter. This SBT plugin uses the Scalatest library to implement a flag enabling custom test reports in JSON. Now I would like…
1
vote
0 answers

How can I add a dependency to my sbt plugin?

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 ++ …
Wonay
  • 1,160
  • 13
  • 35
1
vote
1 answer

sbt assembly failing to build when we try to use the cloudera upstream versions in the sbt file

i am trying to build a Scala project with Cloudera upstream versions using sbt-assembly. it throws the below exception: >sbt assembly Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 [info]…
Avinash
  • 13
  • 1
  • 5
1
vote
1 answer

SBT plugin to create image from a plain Docker text file

I want to build an image for a plain Dockerfile text, Is there an SBT plugin that will let me specify my own docker file.
nokostar
  • 103
  • 1
  • 4
1
vote
1 answer

SBT package produces empty JAR after enhancing compiled classes

I am an author of a SBT plugin: https://github.com/atais/sbt-eclipselink-static-weave It's purpose is to enhance compiled classes using provided StaticWeaveProcessor. To achieve this step I have overriden the compile step with: override def…
Atais
  • 10,857
  • 6
  • 71
  • 111
1
vote
1 answer

How to skip running scalafmt on test code?

Scalafmt official plugin: addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1") doesn't seem to offer any setting to disable running the checks on test code. There is an unofficial neo-sbt-scalafmt that has a setting scalafmtTestOnCompile but it…
Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219