rellocs wood
rellocs wood

Reputation: 1471

how to run maven command line with specified spring profiles?

I'm running spring boot app with mvn command line. how can I active the specified spring profile? I tried this but with no luck:

mvn spring-boot:run -Drun.arguments="some parameters" -Dspring.profiles.active=schedule

Upvotes: 1

Views: 1072

Answers (1)

glytching
glytching

Reputation: 47865

Use run.profiles, for example:

mvn spring-boot:run -Drun.arguments="some parameters" -Drun.profiles=schedule

More details in the docs:

The active profiles to use for a particular application can be specified using the profiles argument

The profiles to enable can be specified on the command line as well

Upvotes: 1

Related Questions