POM_XPATH_DISABLE(7)
β¨ POM_XPATH_DISABLE β¨ (7)
okay bestie, so this one lives in the Java Packages Tools family, and it's literally the "girl, you're off the team" button for Maven modules π
πΈ NAME πΈ
pom_xpath_disable β disables every module whose POM files match a given XPath condition. it's giving "you don't meet the vibe check, so you're sitting this one out" π¦
π SYNOPSIS π
%pom_xpath_disable XPath-expression [POM-location]...
π DESCRIPTION π
so here's the tea: this macro recursively walks every single enabled submodule of the POM you hand it, and evaluates your XPath expression against each one. if the expression comes back with a true value, that matching submodule gets disabled. bye bestie, not you though π
and what counts as "true"? XPath specification said so, not me β it's any of these:
- a true boolean value (like, the kind returned by comparisons)
- a non-empty node set
- a non-empty string
- a non-zero number
now, the dramatic part π β if the main module also satisfies the condition (the main module being whatever you pointed at with POM-location, or pom.xml if you didn't specify), then processing gets aborted before any changes are made at all, and an error is raised. no partial edits, no mess. iconic behaviour honestly.
and if none of the modules satisfy it? also an error. the macro simply refuses to do nothing quietly π
about POM-location, here's how it works:
- it can be a full path to the POM file itself, or
- a path to the directory that contains
pom.xml - if you don't give one at all, it uses
pom.xmlfrom the current working directory - you can pass more file locations and they'll all get processed π«Ά
β EXAMPLES β
disables all modules with classifier test:
%pom_xpath_disable "/pom:project/pom:classifier = 'test'"
disables all sumbodules that explicitly specify packaging:
%pom_xpath_disable /pom:project/pom:packaging
(yes the original says "sumbodules" and I am respectfully keeping it, we don't correct the ancestors π―οΈ)
π¦ AUTHOR π¦
Written by Michael Simacek. king behaviour, no cap π
π REPORTING BUGS π
found something cursed? bugs should be reported through the Java Packages Tools issue tracker at Github:
https://github.com/fedora-java/javapackages/issues
π SEE ALSO π
pom_add_dep(7)pom_add_parent(7)pom_add_plugin(7)pom_remove_dep(7)pom_remove_parent(7)pom_remove_plugin(7)pom_change_dep(7)pom_set_parent(7)pom_xpath_inject(7)pom_xpath_remove(7)pom_xpath_replace(7)pom_xpath_set(7)pom_disable_module(7)
ok that's the whole page bestie, go forth and disable modules with confidence π
JAVAPACKAGES β version dated 2025-09-19 β POM_XPATH_DISABLE(7) πβ¨
π¦ where this page comes from
- fedora 43: javapackages-common 6.4.1-4.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms