Maven exec:java重写pom中定义的系统属性。xml
我的pom里有这个。xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.example.Main</mainClass>
<systemProperties>
<systemProperty>
<key>someKey</key>
<value>someValue</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
当从命令行运行此命令时,我有时希望覆盖上面的someKey:someValue
。我试过这个:
mvn exec:java -DsomeKey=someOtherValue
但它似乎不起作用。有没有办法给这个打点
共 (0) 个答案