When I build my project from the command line with Maven, I can pass in a property using
-Dsomeproperty=true
For example:
mvn clean package -Dsomeproperty=true
How do I do the same when building in Eclipse?
You have to do the following steps (and sorry, I have no environment to prove it, just from documentation):
Run > Maven...
someproperty
and value: true
.See the following resources for details:
After having access to an Eclipse again, here are some screenshots:
The first shows how to configure an existing build (in Eclipse named a run configuration) with the relevant property. and the second shows the command that is then triggered (with the include -Dsomeproperty=true
).
I do not know if there is an easy way to configure the default run configuration. You may provide an empty one, enter there the parameter, and copy then that run configuration adding the additional parameters later. The copy button is on the left top the second one (with the red rectangle marking it).