开发者

Conditional Maven build section with a profile?

I'm building a Flex application with Maven and the Flex Mojos plugin. I now want to c开发者_StackOverflow中文版ompile an alternative version of the application with some extra libraries to enable automated functional testing. For this I need to change 2 things in the pom:

  • extra dependencies
  • extra configuration of the Flex Mojos plugin in the build section

I created a profile in the pom targetted at building the alternative version and added the extra dependencies. I'm wondering however how I can specify the extra configuration of the Flex Mojos plugin in the build section.

Should I just redefine (copy and modify) the complete plugin configuration from the build section into my profile, or is there another way to do this?


Yes, copy the plugin config into your profile. Also define the new dependencies there. Common configuration values between the two plugin configs for the same plugin may be delegated to common properties you define in the pom <properties> element to allow setting the values in a common place.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜