scala - Command line arguments not working for sbt-assembly jars -


i trying pass command line arguments jar created sbt-assembly. neither of these -dconfig.file=application.conf nor -dconfig.trace=loads

my exact command is

java -jar googlescraper-assembly-0.0.1.jar -dconfig.trace=loads -dconfig.resource=application.conf

this build.sbt

lazy val googlescraper = project.in(file("google-data-scraper"))   .settings(commonsettings:_*)   .settings(     version := "0.0.1",     assemblymergestrategy in assembly := {       case m if m.tolowercase.endswith("manifest.mf") => mergestrategy.discard       case m if m.tolowercase.matches("meta-inf.*\\.sf$") => mergestrategy.discard       case "log4j.properties" => mergestrategy.discard       case m if m.tolowercase.startswith("meta-inf/services/") => mergestrategy.filterdistinctlines       case "reference.conf" => mergestrategy.concat       case "application.conf" => mergestrategy.concat       case _ => mergestrategy.first     },     librarydependencies ++= seq(       "com.typesafe" % "config" % "1.3.0",       "com.typesafe.play" % "play_2.11" % "2.3.9",       "com.typesafe.play" % "play-ws_2.11" % "2.3.9",       "com.ning" % "async-http-client" % "1.8.15"     ),     fork in run := true   )   .dependson("util")   .dependson("core") 

edit

so turns out putting argument before -jar makes different. works:

java -dconfig.trace=loads -dconfig.resource=blah.conf -jar googlescraper-assembly-0.0.1.jar

but loading indicates app trying load new config within jar. how can make load externally (absolute path didn't work)?

(extracting answer comments)

jvm options such -d must come before -jar

config.file external file , config.resource resource on classpath.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -