0
votes

I want to refer the project name and version in the URL of the API. For example, my app is called sample-mule-project and has a version "v1". So my final URL should be like /sample-mule-project/v1/

Maven pom has these properties called name and version with which we can refer these values inside the pom file. Is there a way how we can refer these values inside the mule flow?

I tried using ${project.name} and ${project.version} but it did not work which I understand is because these are not defined inside properties file. So is there a way to achieve this?

1

1 Answers

0
votes

That's because Maven properties do not exists anymore when the application is executed.

You can use some Maven plugins to replace values in a properties files, that can be used inside the application. For example the Maven Resources plugin. Be careful of not override properties inside other files, like the XML Mule configurations of the application.