There are many Maven plugins for file manipulation, filtering, copying etc. But is there also a way to create a new XML file from Maven (without creating my own plugin)?
Ideally, I could do something like this:
<build>
<create-file-xml>
<file>${basedir}/src/main/resources/my.xml</file>
<content>
<xml-root>
<any-tags>
${any-variable}
</any-tags>
</xml-root>
</content>
</create-xml-file>
</build>
So that ${basedir}/src/main/resources/my.xml is created with the tags/content under <content>
. And my.xml should be available during my test runs (mvn test).