POM_REMOVE_DEP(7)

πŸ’– POM_REMOVE_DEP(7) πŸ’–

okay bestie, welcome to pom_remove_dep β€” that's the manual page for the Java Packages Tools macro that yeets a dependency on a Maven artifact right out of your POM file. no cap, that's literally the whole job. πŸŽ€


✨ NAME ✨

pom_remove_dep β€” remove dependency on Maven artifact from POM file πŸ¦‹


🌸 SYNOPSIS 🌸

%pom_remove_dep [OPTIONS] *:*[artifactId][:version[:scope]]
[POM-location]...

%pom_remove_dep [OPTIONS] *:*[name][:rev[:conf[:transitive]]]
[Ivy-module-location]...

like, yes, there are two forms β€” one for POM files, one for Ivy modules. iykyk. πŸ’…


πŸ’… OPTIONS πŸ’…

  • -r β€” recursive mode, babes. that means the dependency also gets removed from all enabled submodules of the POM file(s) you handed over. it's giving "and your little submodules too." πŸ‘‘
  • -f β€” do not throw an error when one of the specified files doesn't contain the given dependency. so forgiving. so chill. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

this macro patches the POM file you point it at so it does not contain dependencies on the given Maven artifact. bye bye dependency, no notes. ✨

groupId and artifactId are the identifiers of the Maven group and artifact of the module whose dependency is getting removed. if you omit them, then all identifiers are matched β€” full send, everything gets matched. πŸ’€

when you're modifying Ivy modules, org and name correspond to the Maven groupId and artifactId. same energy, different names. 🌈

now, POM location can be either:

  • a full path to the POM or Ivy file, or
  • a path to the directory containing pom.xml or ivy.xml

if you don't give a POM location, then pom.xml or ivy.xml from the current working directory gets used. and when both pom.xml and ivy.xml are present? pom.xml is the one that gets processed. main character energy fr fr. πŸ‘‘

you can specify more file locations, sure β€” but heads up: if the dependency is not found in all of the given files, the command raises an error. that can be overridden with the -f option. okay so noted. πŸ“


πŸ“ EXAMPLES πŸ“

%pom_remove_dep com.example:

this call removes dependency on all artifacts with groupId com.example from the POM in the current working directory. slay. πŸ’–

%pom_remove_dep boo:bar target/location

this call removes dependency on artifacts with groupId foo and artifactId bar from target/location/pom.xml. (yes bestie, the command says boo β€” that's exactly what the page says, i'm not touching it, i don't make the rules πŸ™ˆ)


🌟 AUTHOR 🌟

written by Mikolaj Izdebski. iconic. πŸ‘‘


😭 REPORTING BUGS 😭

bugs should be reported through the Java Packages Tools issue tracker at Github: https://github.com/fedora-java/javapackages/issues

don't suffer in silence bestie, go file that issue. 🫢


🌈 SEE ALSO 🌈

pom_add_dep(7), pom_add_parent(7), pom_add_plugin(7), pom_disable_module(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).

the whole squad, together. obsessed. πŸ’œ


JAVAPACKAGES β€” 2025-09-19 ✨ that's the version and the date, mwah, go forth and remove some dependencies, ily bye πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from