POM_ADD_DEP(7)
π POM_ADD_DEP(7) π
okay bestie, gather round, because we're talking about pom_add_dep β the Java Packages Tools girlie whose whole job is adding a dependency to a Maven POM file or an Ivy module. yes she's that macro. the manual name is POM_ADD_DEP(7) btw, iykyk π
β¨ NAME β¨
pom_add_dep β add dependency to Maven POM file or Ivy module π¦
πΈ SYNOPSIS πΈ
%pom_add_dep groupId:artifactId[:version[:scope]] [POM-location]...
[extra-XML]
%pom_add_dep org:name[:rev[:conf[:transitive]]] [Ivy-module-location]...
[extra-XML]
%pom_add_dep_mgmt groupId:articId[:version[:scope]] [POM-location]...
[extra-XML]
(and yes, <hotpink>that middle one is the Ivy flavor</hotpink>, and the last one is her sister macro pom_add_dep_mgmt β we'll get to her π
)
π DESCRIPTION π
so basically these macros go in and patch a POM file or an Ivy file you point them at, and they add a dependency on the Maven artifact you describe with artifact coordinates. simple as that, no cap.
pom_add_depdrops that dependency into the<dependencies>XML node.pom_add_dep_mgmtdrops it into<dependencyManagement>instead. different node, different vibe, same energy β¨
π§ the Maven coordinates (groupId / artifactId / version / scope)
groupId and artifactId are the identifiers of the Maven artifact you're adding a dependency on. they MUST be specified. non-negotiable, bestie, they're the whole point.
- if
versionisn't specified, the default value is"any". - if
scopeisn't specified, then no scope is defined at all β and heads up, Maven itself defaults to"compile"in that case. (so like, the macro leaves it blank, Maven fills in the blanks, teamwork π«Ά)
π Ivy modules specifically
when you're modifying Ivy modules, the mapping is:
orgβ Maven'sgroupIdnameβ Maven'sartifactIdrevβ Maven'sversion
Org and name must be specified, and the other attributes just use their defaults. the rest:
confβ specifies the configuration in which the dependency should apply.transitiveβ specifies whether the dependency should also pull in its dependencies. it accepts boolean values:trueorfalse. when unspecified, Ivy defaults totrue.
π where do the files even live (POM location)
POM location can be one of two things:
- a full path to the POM or Ivy file itself, or
- a path to the directory that contains
pom.xmlorivy.xml.
if you don't give a POM location at all, then pom.xml or ivy.xml from the current working directory gets used. and here's the thing β when both pom.xml and ivy.xml are present, pom.xml is the one that gets processed. main character energy, honestly.
you can specify more than one file location and every single one of them will be processed. go off π
π extra XML
Extra XML is additional XML code that gets added into the <dependency> node. this parameter can be omitted, and if you do omit it, then no extra XML is appended. that's it, that's the whole bit.
π₯ EXAMPLES π₯
%pom_add_dep foo:bar baz
this call adds a dependency on artifact foo:bar to the baz/pom.xml file. iconic, no notes π
π AUTHOR π
Written by Mikolaj Izdebski.
π REPORTING BUGS π
Bugs should be reported through the Java Packages Tools issue tracker at Github: https://github.com/fedora-java/javapackages/issues
(please actually report them, the maintainers wanna know, don't just suffer in silence bestie π)
π SEE ALSO π
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_change_dep(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 page, bestie!! this one's from JAVAPACKAGES, dated 2025-09-19, and it lives at POM_ADD_DEP(7) π¦ go forth and add your deps, you absolute legend πβ¨π
π¦ 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