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. π
groupIdcan be omitted entirely, and if you do that, the default valueorg.apache.maven.pluginsgets used instead. slay.artifactIdβ nope, you gotta specify this one. it's mandatory, no skipping. π«Άversionβ if you don't give one, the default valueanyis 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 β
pom_add_dep(7)pom_add_parent(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 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
- 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