pom_remove_dep - Man Page

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]...

Options

-r

Work in recursive mode. That means that dependency is also removed from all enabled submodules of given POM file(s).

-f

Do not throw an error when one of the specified files doesn’t contain given dependency.

Description

This macro patches specified POM file not to contain dependencies on given Maven artifact.

groupId and artifactId are identifiers of Maven group and artifact of the module on which dependency is to be removed.  If they are ommited then all identifiers are matched.

When modifying Ivy modules, the org and name correspond to the Maven groupId and artifactId.

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 POM location is not given then pom.xml or ivy.xml from current working directory is used. When both pom.xml and ivy.xml are present, pom.xml is processed. You can specify more file locations. If the dependency is not found in all of given files, the command raises an error. This can be overriden with the -f option.

Examples

%pom_remove_dep com.example: - this call removes dependency on all artifacts with groupId com.example from POM in current working directory.

%pom_remove_dep boo:bar target/location - this call removes dependency on artifacts with groupId foo and artifactId bar from target/location/pom.xml.

Author

Written by Mikolaj Izdebski.

Reporting Bugs

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

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).

Referenced By

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

2024-11-24 JAVAPACKAGES Java Packages Tools