I want to insert the content of a file into an xml-file (using XPath or a replacer token). This should happen during the build process using maven.
My first try was to use the maven ant task plugin and the xmltask task of ant.
<xmltask source="sourceFile.xml" dest="destinationFile.xml">
<replace path="//L7p:MapValue[2]/L7p:Mappings" withfile="xmlFileToInsert.xml" />
</xmltask>
That worked fine for a while, but now i want to insert not valid xml. This xml will be made valid in future steps - but its really required to insert invalid xml here. AFAIK, this does not work with the xmltask of ant. If you know a way to disable the validation, it would also help.
Now, I'm searching for nearly the same xmltask can do in combination with maven and ant but without the validation of xml.
What do you guys think is the best way to do this with maven?
- List item
- Include shell script?
- Write an maven plugin?
- ???
Thanks for your opinion and help.