我试图激活使用内部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
它是“按设计”吗?如果是,可能的解决方法是什么?
这是一个解决方法:http://stackoverflow.com/a/14386303/290918 – kldavis4 2013-01-17 21:40:59
我已经创建了一个功能请求,它将'settings.xml'中的''标签添加到'pom。xml“,以便您可以定义要激活的配置文件。 https://issues.apache.org/jira/browse/MNG-6000 –
flungo
2016-04-14 15:36:03