【发布时间】:2010-11-04 08:38:00
【问题描述】:
我们有一个多模块构建,其中包含使用不同技术(如 Java 和 Flex)的模块。是否可以根据当前编译的模块激活不同的配置文件?
我尝试过类似的激活方式
<profile>
<id>flex</id>
<activation>
<file>
<exists>${basedir}/src/main/flex</exists>
</file>
</activation>
...
</profile
但它不起作用,尽管 ${basedir} 的使用是documented in the Maven documentation(这是 Maven 中的一个错误)。基于当前模块是否有不同的激活方式?或者 Maven 是否只允许激活所有模块的配置文件?
【问题讨论】: