0

I have following properties in pom.xml file :-

<properties>
<cm_java_home>C:/Java/jdk1.8.0-102/bin</cm_java_home>
</properties>

But, I need to change this during building job from Jenkins, and it should look like as given below:-

<properties>
<cm_java_home>/home/abc/Java/jdk-1.8.0-102/jre</cm_java_home>
</properties>

How to modify my properties tag in pom.xml file using Jenkins job configuration ?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142

1 Answers1

0

Simply, to modify any property of pom.xml file, use -D=value.

For instance, in my case,

I used the following:-

mvn clean install -Dcm_java_home="/home/abc/Java/jdk1.8.0_102/jre"