I have a simple property file, containing the following lines:
abc=123
location=C:\temp
version=1.0.0
Now, using some Maven plugin, I need to change the value of version from 1.0.0 to some other value.
I know I can use the maven-replacer-plugin by replacing 1.0.0 with some token (say $my_version). Then, I could use this token to replace the value on the fly.
However, I don't want to use the token value; what I need is to replace all the text after the = (equal sign).
How can I do that?
You can use
maven-antrun-pluginto replace a string in the source code. Declareresourcesandpluginas below:Run
mvn clean installthe string/token in the properties file will be replaced by the value given in pom.xml