0

I have a src/main/resources/application.yml in my mvn archetype files for a spring boot application with

app-name-version: @project.name@-v@project.version@

This allows me to get the current version of the project at runtime.

When creating a project out of the archetype, @project.name@and @project.version@ are replaced with the values of the mvn archetype. I tried to forbid this via

<fileSet encoding="UTF-8" filtered="false">
    <directory>src/main/resources</directory>
    <includes>
        <include>**/*.*</include>
    </includes>
</fileSet>

but this does not work.

Do you have any idea how to forbid replacing the variables?

Marius
  • 365
  • 4
  • 18
  • I think you cannot stop from refering because the sole purpose of making was to access that fields value. But in the first place why you want to write that way and stop accessing those values? – Shivendra Tiwari Aug 07 '20 at 09:20

1 Answers1

0

In your template:

#set($AT = '@')
app-name-version: ${AT}project.name${AT}-v${AT}project.version${AT}
Allen D. Ball
  • 1,916
  • 1
  • 9
  • 16