开发者

Generate XML File with Maven

开发者 https://www.devze.com 2023-01-30 02:06 出处:网络
I have an XML file that looks like this... <foo> <bar>$VALUE$</bar> </foo> Is th开发者_StackOverflow中文版ere anyway I can merge this xml file and a .properties file using M

I have an XML file that looks like this...

<foo>
   <bar>$VALUE$</bar>
</foo>

Is th开发者_StackOverflow中文版ere anyway I can merge this xml file and a .properties file using Maven or is this a task best left to Ant?


The resource plugin can copy with filtering, replacing a placeholder ($VALUE$ in this case) with a property value. Here's the relevant doc: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

It should be noted that maven placeholders look like this: ${VALUE}.


You may use Ant for merging and invoke the task from Maven.

0

精彩评论

暂无评论...
验证码 换一张
取 消