https://bugzilla.redhat.com/show_bug.cgi?id=1175281
Bug ID: 1175281
Summary: pom_xpath_replace - begin/end of code added by
maintainer comments misplaced
Product: Fedora
Version: 21
Component: javapackages-tools
Assignee: mizdebsk(a)redhat.com
Reporter: mattias.ellert(a)fysast.uu.se
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
mat.booth(a)redhat.com, mizdebsk(a)redhat.com,
msimacek(a)redhat.com, msrb(a)redhat.com
Description of problem:
$ cat pom.xml
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Bad value</name>
</project>
$ python /usr/share/java-utils/pom_editor.py pom_xpath_replace
'//pom:project/pom:name/text()' "Fixed value"
$ cat pom.xml
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Fixed value<!-- begin of code added by maintainer --><!-- end of
code
added by maintainer --></name>
</project>
Version-Release number of selected component (if applicable):
javapackages-tools-4.1.0-4.fc21.noarch
How reproducible:
Always
Steps to Reproduce:
1. See above
Actual results:
$ cat pom.xml
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Fixed value<!-- begin of code added by maintainer --><!-- end of
code
added by maintainer --></name>
</project>
Expected results:
$ cat pom.xml
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name><!-- begin of code added by maintainer -->Fixed value<!-- end of
code
added by maintainer --></name>
</project>
Additional info:
I expect the added text ("Fixed value" in the example) to appear between the
begin/end of code added by maintainer comments. Not befor them as is the case
now.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=nY4xgtG8LL&a=cc_unsubscribe