I am creating a maven archetype. It should contain some predefined files in
src/site/markdown
. These files should include the artifactId.
I tried to reference it using ${artifactId}
inside the md file but no luck.
Any other idea?
I am creating a maven archetype. It should contain some predefined files in
src/site/markdown
. These files should include the artifactId.
I tried to reference it using ${artifactId}
inside the md file but no luck.
Any other idea?
I had the same problem and this is how I fixed it.
In the resources/META-INF/maven/archetype-metadata.xml
, I added
<fileSet encoding="UTF-8" filtered="true">
<directory></directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
Then in the resources/archetype-resources/README.md
I added
The name of the project is ${artifactId}
Now when I build a maven project using this archetype, I have the value of artifactId
populated in the README.md
file.
For the respective fileset in the
archetype-metadata.xml
one need to setfiltered=true
.