Search code examples
spring-bootjhipsterspring-boot-maven-plugin

JHipster executable WAR using dev profile instead of prod


I package a WAR using mvnw -Pprod package. According to JHipster website:

Please note that this WAR file uses the profile we selected when building it. As it was built using the prod file in the previous section, it will therefore run with the prod profile.

And also:

When you run your production application from a WAR file, the default is to use the same profile(s) as used during packaging. If you want to override this, you can explicitly provide an alternative in VM argument

However, when I run my WAR without --spring.profiles.active=prod, it runs under the dev profile. What gives?


Solution

  • JHipster web site documents the most recent version. In your case, your version is well behind latest so it does not longer match but you can find the archived documentation for your exact version at https://jhipster.github.io/documentation-archive/