We have multiple JSP web applications that are all build using Maven, version 3.5.4. We need to create the same URL (may be /version.jsp
or just /version
) on all projects to return the version stored in pom.xml (or pom.properties). Additionally the response should be returned in HTML, XML or JSON depending on a parameter in the URL, but that will be another matter.
There are 20 plus projects and I don't want to copy and paste the same file and change the pom.properties file path over all projects. Maven places the pom.properties file on the /artifactId path. It could be a maintenance nightmare.
We use a parent pom.xml and one pom.xml on each project for the specifics. My idea is to configure something in the parent pom to place that version.jsp
on all projects during the build. Is that possible? How? Would you do it differently?
Thank you