His
His

Reputation: 6043

How to pass system property "javax.net.ssl.keyStore" as argument to gradle bootRun (Gradle 7.4)

I'm struggling to get this to work.

This below works fine:

./gradlew bootRun --args="--spring.profiles.active=dev"

But, all these below don't seem to work to pass in javax.net.ssl.keyStore, unless I'm mistaken in my testing.

./gradlew bootRun --args="--spring.profiles.active=dev --javax.net.ssl.keyStore=/file"

./gradlew bootRun --args="--spring.profiles.active=dev --Djavax.net.ssl.keyStore=/file"

./gradlew bootRun --args="--spring.profiles.active=dev -Djavax.net.ssl.keyStore=/file"

./gradlew bootRun -Dspring.profiles.active=dev -Djavax.net.ssl.keyStore=/file

I'd like to avoid modifying the task in build.gradle and need the system properties to be passed in as command line arguments.

Upvotes: 0

Views: 340

Answers (1)

Juan Carlos Alafita
Juan Carlos Alafita

Reputation: 280

What about of

-Djavax.net.ssl.keyStore=file:/your_file_path

Upvotes: 0

Related Questions