1 回答

TA貢獻(xiàn)1871條經(jīng)驗(yàn) 獲得超8個(gè)贊
您似乎配置了錯(cuò)誤的插件。您說您需要“能夠在測試期間使用此參數(shù)”,這意味著您應(yīng)該配置Maven Surefire Plugin。
也許你可以使用systemProperties
:
?<plugin>
? ? ? ? <groupId>org.apache.maven.plugins</groupId>
? ? ? ? <artifactId>maven-surefire-plugin</artifactId>
? ? ? ? <version>3.0.0-M3</version>
? ? ? ? <configuration>
? ? ? ? ? <systemProperties>
? ? ? ? ? ? <property>
? ? ? ? ? ? ? <name>propertyName</name>
? ? ? ? ? ? ? <value>propertyValue</value>
? ? ? ? ? ? </property>
? ? ? ? ? ? [...]
? ? ? ? ? </systemProperties>
? ? ? ? </configuration>
? ? ? </plugin>
或argLine方法:
<argLine>-Djava.endorsed.dirs=...</argLine>
添加回答
舉報(bào)