I’m creating a Maven archetype that includes a javascript file. I would like to use the ${package}
and ${artifactId}
template variables inside my javascript file. Is this possible?
When I then generate a project from the archetype, the javascript file still includes the ${package}
rather than the value of package
.
Here is the relevant part of my archetype-metadata.xml
JavaScript
x
13
13
1
<fileSets>
2
<fileSet encoding="UTF-8">
3
<directory></directory>
4
<includes>
5
<include>**/*.json</include>
6
<include>**/*.js</include>
7
<include>**/*.lock</include>
8
<include>.eslintignore</include>
9
<include>.gitignore</include>
10
</includes>
11
</fileSet>
12
</fileSets>
13
Advertisement
Answer
You need to set filtered
to true
on the fileSet.