Coder Social home page Coder Social logo

-Dconfig.file ignored about sbt-extras HOT 3 CLOSED

dwijnand avatar dwijnand commented on July 17, 2024
-Dconfig.file ignored

from sbt-extras.

Comments (3)

paulp avatar paulp commented on July 17, 2024

I don't know how that works but it's not related to this program. If you pass -Dfoo=bar to it, system property foo will be set to bar. How your particular example is interpreted by akka and/or kafka I have no idea.

from sbt-extras.

dwijnand avatar dwijnand commented on July 17, 2024

@rbellamy It's probably that sbt is forking a new JVM process, rather than running your app in-process.

So you need to set the sys props with javaOptions.

From the command line you could call it like this:

sbt "set javaOptions in myApp += \"-Dconfig.file=`pwd`/application.conf\"" run

Or in the build file (e.g. local.sbt) with something like:

javaOptions in LocalProject("myApp") +=
  s"""-Dconfig.file=${sys.props("user.dir")}/application.conf"""

from sbt-extras.

rbellamy avatar rbellamy commented on July 17, 2024

@dwijnand that's it exactly! Thanks...

from sbt-extras.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.