[Trunk-5676] Project version & Revision Number Placeholders Not Replaced When Running With Jetty Using Maven

Heres the link to the issue - https://issues.openmrs.org/browse/TRUNK-5676

Description

Running the master branch (commit # 4874e66b67e7401c0eb236dc083fda14c3904648) with mvn jetty:run display the UI with ${project.version} and ${revisionNumber} not replaced with actual numbers as expected .

I was going through this issue and found that This problem arises because for the run goal Jetty deploys the webapp from its sources, not from war. If we set the goal jetty:run-war then there is no such issue as in the war ${project.version} and ${revisionNumber} are replaced with actual numbers.

See here :https://www.eclipse.org/jetty/documentation/9.1.5.v20140505/jetty-maven-plugin.html

I went through the documentation and it appeared that path location for deployment can be configured.

The run goal runs on a webapp that does not have to be built into a WAR. Instead, Jetty deploys the webapp from its sources. It looks for the constituent parts of a webapp in the Maven default project locations, although you can override these in the plugin configuration. For example, by default it looks for:

resources in ${project.basedir}/src/main/webapp
classes in ${project.build.outputDirectory}
web.xml in ${project.basedir}/src/main/webapp/WEB-INF/}}{{

While this approach worked on a sample project but failed on openmrs webapp. I am getting a HTTP 503 error and also no error appears in the logs. Any ideas ?

Did you eventually figure this out?

I am still stuck at this.

Can you share a draft pull request for the changes you made in the openmrs web app to get a 503?

Heres the link to the change I have made -https://github.com/openmrs/openmrs-core/compare/master...Am-Coder:TRUNK-5676?expand=1

Heres the draft PR - https://github.com/openmrs/openmrs-core/pull/3120

can someone tell me where exactly are revisionNumber, project.basedir, project.build.outputDirectory, project.version and project.basedir declared? i searched them… couldn’t find them anywhere…

Did you go through the issue at JIRA and this talk thread ?