POM_ADD_PLUGIN(7)

πŸ’– POM_ADD_PLUGIN πŸ’–

okay bestie, so this is pom_add_plugin β€” a Java Packages Tools macro that rolls up to your POM file and adds a whole plugin invocation to it. no cap, it literally patches the POM for you. πŸ’…


✨ SYNOPSIS ✨

%pom_add_plugin groupId:artifactId[:version] [POM-location]...
[extra-XML]

🌸 DESCRIPTION 🌸

This macro patches the POM file(s) you point it at, adding a plugin invocation for the groupId and artifactId you give it. iconic behaviour honestly.

So here's the tea on those identifiers: groupId and artifactId are the identifiers of the Maven plugin artifact whose invocation you want added. πŸŽ€

  • groupId can be omitted entirely, and if you do that, the default value org.apache.maven.plugins gets used instead. slay.
  • artifactId β€” nope, you gotta specify this one. it's mandatory, no skipping. 🫢
  • version β€” if you don't give one, the default value any is used. easy.

Now, the POM location. This can be either:

  • a full path to the POM file itself, or
  • a path to the directory that contains pom.xml.

If you don't give a POM location at all, then pom.xml from the current working directory is used. And here's the fun part β€” you can pass more than one file location and it'll process all of them. multitasking queen. πŸ‘‘

Then there's extra XML β€” that's additional XML code you want shoved into the <plugin> node. This parameter is optional, and if you leave it out, no extra XML gets appended. simple as that. πŸ’œ


πŸ¦‹ EXAMPLES πŸ¦‹

this one adds an invocation of the plugin com.example:plugin to foo/pom.xml:

%pom_add_plugin com.example:plugin foo

and this one adds an invocation of the Maven Compiler Plugin with target configured to 1.5:

%pom_add_plugin :maven-compiler-plugin . "<target>1.5</target>"

see how the groupId dipped out and it still ate? that's the default org.apache.maven.plugins doing its thing. πŸ’…βœ¨


🌈 AUTHOR 🌈

Written by Mikolaj Izdebski. 🫢


😭 REPORTING BUGS 😭

found a bug? don't suffer in silence bestie, report it through the Java Packages Tools issue tracker on Github: https://github.com/fedora-java/javapackages/issues. πŸ›


⭐ SEE ALSO ⭐


and that's the whole page, bestie πŸ’– this came from JAVAPACKAGES, dated 2025-09-19, and it's the POM_ADD_PLUGIN(7) manual β€” go forth and add those plugins, you absolute icon. πŸ‘‘πŸŒΈβœ¨

πŸ“¦ where this page comes from