1POM_XPATH_SET(7)              Java Packages Tools             POM_XPATH_SET(7)
2
3
4

NAME

6       pom_xpath_set - set contents of XML node from XML file
7

SYNOPSIS

9       %pom_xpath_set XPath new-contents [XML-file-location]
10

DESCRIPTION

12       This macro patches specified POM file replacing contents of all XML
13       nodes described by the XPath expression with given new text content.
14       This works on both elements and attributes.
15
16       XPath is an expression describing a set of XML nodes to be removed from
17       the POM file. It must be a properly formated XPath 1.0 expression, as
18       described in http://www.w3.org/TR/xpath/.
19
20       Maven POM files use specific XML namespace
21       http://maven.apache.org/POM/4.0.0 as default. This namespace needs to
22       be explicitly specified in XPath expressions by prefixing all node
23       names with pom (i.e. pom:modelVersion).
24
25       Many other XML formats also use namespaces which you have to explicitly
26       specify. This script will use the namespace prefix names from the xmlns
27       declarations in the document’s root element. So if the document begins
28       with <root xmlns:my="myurl.com"> you would select the root node with
29       XPath expression /my:root. If the document specifies a default
30       namespace (eg xmlns="myurl.com") use the prefix named default to acces
31       elements in that namespace.
32
33       XML location can be either a full path to the XML, or a path to the
34       directory containing pom.xml or ivy.xml. If XML location is not given
35       then pom.xml or ivy.xml from current working directory is used. When
36       both pom.xml and ivy.xml are present, pom.xml is processed. You can
37       specify more file locations.
38

AUTHOR

40       Written by Mikolaj Izdebski.
41

REPORTING BUGS

43       Bugs should be reported through Java Packages Tools issue tracker at
44       Github: https://github.com/fedora-java/javapackages/issues.
45

SEE ALSO

47       pom_add_dep(7), pom_add_parent(7), pom_add_plugin(7),
48       pom_disable_module(7), pom_remove_dep(7), pom_remove_parent(7),
49       pom_remove_plugin(7), pom_set_parent(7), pom_xpath_inject(7),
50       pom_xpath_remove(7), pom_xpath_replace(7).
51
52
53
54JAVAPACKAGES                      07/21/2022                  POM_XPATH_SET(7)
Impressum