简体   繁体   English

使用Maven通过模板生成文件

[英]Generate file by template using maven

I have a directory that contains several children-directories. 我有一个包含几个子目录的目录。 These directories are being generated by maven assembly plugin. 这些目录由maven程序集插件生成。 I want to generate the .properties file that contains smth like 我想生成包含以下内容的.properties文件

module1.home=${.dir}/module1
module2.home=${.dir}/module2

and so on. 等等。 So I want 1 line for each child-directory. 所以我要每个子目录1行。 I have a velocity template that describes content of the file. 我有一个描述文件内容的速度模板。 Which plugin can do it for me? 哪个插件可以为我做? Thanks a lot. 非常感谢。

velocity-maven-plugin在允许您在构建过程中运行Velocity模板方面做得很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM