I want to generate a resource file containing information from pom.xml
that I can then load in my Java application. I followed this and this. I can generate .properties
file with some information substituted but not license information.
I have this section in my pom.xml
:
<licenses>
<license>
<name>MIT license</name>
<url>https://spdx.org/licenses/MIT.html</url>
<distribution>manual</distribution>
<comments>A short and to the point license that allows almost anything</comments>
</license>
</licenses>
And then I want to do this:
licenseName = ${project.licenses.license.name}
licenseUrl = ${project.licenses.license.url}
but the values do not get replaced.
Googling suggests using some plugins that handle licenses, but that is too much for my use case.
Thank you.