Questions tagged [sbt-onejar]

sbt-onejar is a simple-build-tool plugin for building a single executable JAR containing all your code and dependencies as nested JARs.

8 questions
3
votes
0 answers

sbt one-jar not running if the main class does not have a main method

I am trying to develop a sample javafx application in scala. I am using sbt-one-jar for packaging the application. My class MainClass extends the javafx Application which in-turn provides the main method. I am able to right-click in the IDE and run…
2
votes
1 answer

Error when starting a jar created with one-jar

I have an sbt project that should create a runnable jar file. While the jar is created correctly, when this is started it throws an exeception: Exception in thread "main" java.lang.reflect.InvocationTargetException at…
Clynamen
  • 509
  • 1
  • 6
  • 16
1
vote
1 answer

SBT one-jar Plugin Usage

I'm using the one-jar plugin to generate a fat jar file. Here is how my Build.scala looks like: import com.github.retronym.SbtOneJar import sbt._ import Keys._ object build extends Build { def standardSettings = Seq( exportJars := true ) ++…
joesan
  • 13,963
  • 27
  • 95
  • 232
1
vote
1 answer

How to turn off warnings on application load from one-jar executable?

I am using sbt with the one-jar plugin, but when I run the one-jar executable that has been created I get a continuous stream of messages that look like the following: JarClassLoader: Warning: net/liftweb/json/Formats$$anon$4.class in…
C R
  • 2,182
  • 5
  • 32
  • 41
1
vote
1 answer

sbt-onejar and multi-project build

When using oneJar to package a multi project sbt build, project dependencies are not bundled into the jar. My setting is the following: foo/build.sbt (top-level build.sbt) foo/src/ (sources of the root…
paradigmatic
  • 40,153
  • 18
  • 88
  • 147
0
votes
1 answer

logback.xml not working witn one-jar

I am using sbt one-jar for building an executable jar file in my application. I am also using logback for logging. I am able to get the log file correctly when I run the application in my local. However, after creating one-jar, and executing it,…
Yadu Krishnan
  • 3,492
  • 5
  • 41
  • 80
0
votes
1 answer

OneJar Expand with (or without) sbt-onejar

Is there a way to tell the sbt-onejar SBT plugin to produce a JAR in such way that the .class files of my project are in "expanded" form and not under lib/myproject.jar? Alternatively, is it possible to tell sbt-onejar to produce a JAR that, when…
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
0
votes
0 answers

SBT custom task hangs

I have the following custom taskKey in my built.sbt: (it's my first attempt at defining a custom SBT task, so beware of stupidities) lazy val makeDeployJar = taskKey[java.io.File]( "Runs 'package', collects all the sub-project JARs in the lib…
Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111