Nov 20, 2011

Override pom from command line

Hi Everyone,

I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.

Solution:
Define a property like this
  <skip.my.tests>true</skip.my.tests>
Add it to the <properties> section

In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>

This is the solution for all the thing you want to override from command line.

Hoped it helped,

Dor