POM_CHANGE_DEP(7)

πŸ’– POM_CHANGE_DEP πŸ’–

okay bestie, gather round, because this one is literally the glow-up artist for your dependency list ✨ It's a pom_change_dep situation β€” meaning it changes a dependency in a Maven POM file or an Ivy module. Same energy, new artifact coordinates. Slay.


🌸 SYNOPSIS 🌸

%pom_change_dep [OPTIONS] SOURCE_ARTIFACT CHANGED_ARTIFACT
[POM-location]... [extra-XML]

%pom_change_dep [OPTIONS] SOURCE_ARTIFACT CHANGED_ARTIFACT
[Ivy-module-location]... [extra-XML]

✨ OPTIONS ✨

  • -r β€” recursive mode, bestie. That means the dependency you're changing also gets changed in all enabled submodules of the POM file(s) you gave it. Heads up though: this has no effect if the file isn't a Maven POM. Ivy modules, this one's not for you πŸ’…
  • -f β€” the chill pill option. Normally it throws an error when one of the files you specified doesn't contain the given dependency, and -f says "no, we're not doing that." No error thrown. Periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

These macros patch a specified POM or Ivy file, changing a dependency on the Maven artifact given by some artifact coordinates over to the artifact given by a second set of Maven coordinates. The artifact specification format is the same one %pom_add_dep uses β€” iykyk.

Here's the cute part: if a part of that second artifact specification is omitted or empty, the original value just... stays. Left unmodified, untouched, thriving 🌸

But if you supply the special value - for a given part? That part of the artifact specification gets deleted. Gone. Not me casually erasing a groupId 😭


Now, the POM location, because this matters:

  • It can be 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 at all, then pom.xml or ivy.xml from the current working directory gets used. Convenient, honestly.
  • When both pom.xml and ivy.xml are present, pom.xml is the one that gets processed. Ivy found dead in a ditch, I fear.
  • You can specify more file locations, and all of them get processed. Multi-tasking queen πŸ‘‘

Extra XML is additional XML code that gets added into the <dependency> node. You can omit this parameter entirely, in which case no extra XML is appended. No notes.


🌈 EXAMPLES 🌈

pom_change_dep foo: com.example.foo: -

this call changes the groupId of all dependencies which have groupId foo to com.example.foo. Their artifactId, versions and other possible parts are left unmodified. They ate and left no crumbs πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Written by Michael Simacek. (iconic behavior, truly)


πŸ’€ REPORTING BUGS πŸ’€

Bugs should be reported through the Java Packages Tools issue tracker at Github:

https://github.com/fedora-java/javapackages/issues

fr fr if something's broken, tell them there. Don't suffer in silence, bestie 🫢

πŸŽ€ SEE ALSO πŸŽ€

pom_add_dep(7), pom_add_parent(7), pom_add_plugin(7), pom_disable_module(7), pom_remove_dep(7), pom_remove_parent(7), pom_remove_plugin(7), pom_set_parent(7), pom_xpath_inject(7), pom_xpath_remove(7), pom_xpath_replace(7), pom_xpath_set(7).


and that's the whole vibe, bestie β€” this page came straight out of JAVAPACKAGES, dated 2025-09-19, filed under POM_CHANGE_DEP(7) πŸ’œ go forth and change those deps βœ¨πŸ¦‹

πŸ“¦ where this page comes from