开发者

Exec goals before war archive package

开发者 https://www.devze.com 2023-03-28 17:04 出处:网络
I want to run maven-replacer-plugin just before packaging war. I have 开发者_JAVA百科find \"prepare-package\" phase but it triggered before war assembled and all resources copied, but I need to make c

I want to run maven-replacer-plugin just before packaging war. I have 开发者_JAVA百科find "prepare-package" phase but it triggered before war assembled and all resources copied, but I need to make changes when all resources copied and just before archive create. Is this possible in maven?

BTW, I use maven-2.2.1.

Thanks.


I have found answer in maven replacer plugin WIKI. The trick is to make all things after war:exploded but then use <useCache>true</useCache> property in war plugin configuration. And war:war will use existing files and don't rewrite them.


If you mean you need to do something after webapp resources are copied, then no. The war plugin does that in the process of building the war, so you'd need to execute something inside the war plugin, which isn't going to happen without modifying the war plugin itself.

0

精彩评论

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

关注公众号