Activate different Maven profiles depending on current module?

前端 未结 6 1368
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 04:05

We have a multi module build with modules using different technologies, like Java and Flex. Is it somehow possible to activate different profiles based on the module that is

6条回答
  •  渐次进展
    2020-12-20 04:34

    After some more research I finally came to the conclusion that this is not possible for two reasons in the current Maven version (2.1.0):

    • Maven profiles are not inherited, so you can't define a profile in a parent POM and activate that in a child POM.
    • I haven't found a possibility to activate a profile from a POM itself. The activation does not work with ${basedir} and the property activation response only to system settings, which are globally specified through the -D option.

提交回复
热议问题