您能否告訴我我是否可以動態更改Include
和Exclude
的Maven Surfire插件?maven-surefire-plugin的動態包含和排除
例如:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/${param}Spec*.*</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
我想有$param
從命令行傳遞時,我們執行Maven的測試命令。
如果您有解決方案,請給出建議。我試過argline
和systemProperties
謝謝!
的可能的解決方案之一是使用maven [輪廓](http://maven.apache.org/guides/introduction/introduction-to-profiles .html) –
看到這一個:https://stackoverflow.com/questions/7513319/passing-command-line-arguments-from-maven-as-properties-in-pom-xml/7515282 –
爲什麼你想改變那動態?沒有運行所有測試(spec *)? – khmarbaise