我試圖激活使用內部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