我想更改maven-surefire-plugin
的默認設置,而不是使用<reportFormat>brief</reportFormat>
,我想使用<reportFormat>plain</reportFormat>
。對.m2/settings.xml中maven surefire插件的全局更改
通常情況下,我會通過修改個人pom
爲一個項目,如實現這一目標:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportFormat>plain</reportFormat>
</configuration>
</plugin>
但是,是否有可能以某種方式修改~/.m2/settings.xml
文件,並設置<reportFormat>plain</reportFormat>
爲所有Maven項目默認行爲我想編譯。 我做了許多maven項目的分析,所以我寧願改變全局級別的行爲,而不是修改每個項目的pom
文件。
您應該使用企業pom,在其中定義您希望爲公司提供的默認東西,但settings.xml不是正確的位置,也不可能這樣做......但這需要您已經擁有使用一個coporate pom文件... – khmarbaise