Skip to content

Allow -D options to be passed to forked spring boot #22

Closed
@cah-nathan-zender

Description

@cah-nathan-zender

I have an application that requires spring profiles to be set to run locally. This means that when I try to run the task when it spins up the app but of course it does not work.

What i run now
./gradlew generateOpenApiDocs

Suggestions

Allow passing in them from whatever is passed to gradle
./gradlew generateOpenApiDocs -Dspring.profiles.active=localdb,otherprofile,etc

Although this might also requires configuration at the task level...see here
https://mrhaki.blogspot.com/2015/09/gradle-goodness-pass-java-system.html

So maybe making it a configuration option makes it easier/more straight forward.

openApi {
    forkedSystemProperties = "-Dspring.profiles.active=localdb,otherprofile,etc"
}

I'm willing to help with a PR just would be interested in feedback on what direction feels like the better option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions