Alejandro
Alejandro

Reputation: 826

JHipster is not showing version from pom

I have a monolithic application generated with JHipster. After upgrading to 6.2.0 I can't see the version next to my app's name. When I print the value of process.env, I can see that the version's value is UNKNOWN and in my pom.xml I have <version>1.0</version>.

Why is it not showing the app's version?

Upvotes: 0

Views: 709

Answers (1)

Ga&#235;l Marziou
Ga&#235;l Marziou

Reputation: 16284

If you look at your pom.xml, you'll see that the APP_VERSION env variable is passed by the frontend-maven-plugin to webpack which uses it to set VERSION in webpack/webpack.common.js. If APP_VERSION is not set, VERSION takes UNKNOWN as default value.

This can work only if the frontend build is run through maven.

It does not work if you build using only npm start because it overwrites app.constants.js without the env var set by maven. So as it is now it'll work only for production builds (i.e mvnw -Pprod)

This has been identified as a regression in JHipster: https://github.com/jhipster/generator-jhipster/issues/10192

Upvotes: 2

Related Questions