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.xml from 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 🌈


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