我正在尝试使用在pom.xml
内定义的属性来激活一个maven配置文件:
<project>
[...]
<properties>
<run.it>true</run.it>
</properties>
[...]
<profiles>
<profile>
<activation>
<property><name>run.it</name></property>
</activation>
[...]
</profile>
</profiles>
[...]
</project>
显然它无法工作。但是,从命令行启用可以正常工作:
mvn -Drun.it
这是“按设计要求”吗?如果是的话,是否有可能有一种解决方法?
settings.xml
中添加<activeProfiles>
标签到pom.xml
中,以便您可以定义要激活的配置文件。https://issues.apache.org/jira/browse/MNG-6000 - flungo