Reputation: 11691
Is there any way to override properties-maven-plugin's set-system-properties by -Dpropname=value on the command line? In other words: to set system properties only if they have not been set already?
Upvotes: 2
Views: 783
Reputation: 31087
Go via a regular property:
<properties>
<propname>Default Value</propname>
</properties>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>set-system-properties</goal>
</goals>
<configuration>
<properties>
<property>
<name>system.property.name</name>
<value>${propname}</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
Then run with -Dpropname="Specified Value"
.
Upvotes: 2