Trying to use xmlstarlet to set the version on a pom.xml The problem is that it sets the values of ALL "value" nodes in the pom.xml and not just the one that matches the XPATH Here is what I am using:
xmlstarlet ed --inplace -N x=http://maven.apache.org/POM/4.0.0 -u '//x:project//x:version' -v $NEWVERSION pom.xml
So it works but with the unwanted side-effect of setting the value in other xpaths like /project/parent/version and /project/dependencies/dependency/version Why is it doing that?