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

NAME

6       pom_xpath_remove - remove a node from XML file
7

SYNOPSIS

9       %pom_xpath_remove [OPTIONS] XPath [XML-file-location]...
10

OPTIONS

12       -r
13           Work in recursive mode. That means that given node is also removed
14           from all enabled submodules of given POM file(s). Has no effect if
15           the file is not Maven POM.
16
17       -f
18           Do not throw an error when one of the specified files doesn’t
19           contain given node.
20

DESCRIPTION

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

EXAMPLES

49       %pom_xpath_remove pom:project/pom:reporting - this call removes
50       reporting section from POM in current working directory.
51
52       %pom_xpath_remove 'ivy:configure' build.xml - this call disables
53       loading of ivy configuration in build.xml file. Note the use of ivy
54       namespace which was declared in the document as
55       xmlns:ivy="antlib:org.apache.ivy.ant".
56

AUTHOR

58       Written by Mikolaj Izdebski.
59

REPORTING BUGS

61       Bugs should be reported through Java Packages Tools issue tracker at
62       Github: https://github.com/fedora-java/javapackages/issues.
63

SEE ALSO

65       pom_add_dep(7), pom_add_parent(7), pom_add_plugin(7),
66       pom_disable_module(7), pom_remove_dep(7), pom_remove_parent(7),
67       pom_remove_plugin(7), pom_change_dep(7), pom_set_parent(7),
68       pom_xpath_inject(7), pom_xpath_replace(7), pom_xpath_set(7).
69
70
71
72JAVAPACKAGES                      08/06/2018               POM_XPATH_REMOVE(7)
Impressum