0

Am having spring profiles configured in my application like DEV, TEST, QA. how can i select those profiles using maven commands.

As of now, am selecting those profiles using.

clean package -P DEV

But also i have other configuration like,

clean pacakage -Dtuf.environment="DEV" -Dapi.environment="DEV" -Dspring.profiles.active="DEV"

So, in these two commands which one is best to select. Also, if i want to pass these profile as run time argument from tomcat vmarguments how can i pass these as arguments.

Am using tomcat 8.5 version

Karthikeyan
  • 1,927
  • 6
  • 44
  • 109

1 Answers1

1

You can use -Dspring.profiles.active without declaring it every time by creating a script setenv.sh in the bin folder of tomcat, in which you override the variable JAVA_OPTS