1POM_ADD_DEP(7) Java Packages Tools POM_ADD_DEP(7)
2
3
4
6 pom_add_dep - add dependency to Maven POM file or Ivy module
7
9 %pom_add_dep groupId:artifactId[:version[:scope]] [POM-location]...
10 [extra-XML]
11
12 %pom_add_dep org:name[:rev[:conf[:transitive]]]
13 [Ivy-module-location]... [extra-XML]
14
15 %pom_add_dep_mgmt groupId:articId[:version[:scope]] [POM-location]...
16 [extra-XML]
17
19 These macros patch specified POM or Ivy file adding a dependency on
20 given Maven artifact specified by artifact coordinates. pom_add_dep
21 adds the dependency to <dependencies> XML node, while pom_add_dep_mgmt
22 adds it to <dependencyManagement>.
23
24 groupId and artifactId are identifiers of Maven artifact on which
25 dependency is to be added. They must be specified. If version is not
26 specified then default value of "any" is used. If scope is not
27 specified then no scope is defined (Maven defaults to "compile" in this
28 case).
29
30 When modifying Ivy modules, the org, name and rev correspond to the
31 Maven groupId and artifactId and version. Org and name must be
32 specified, other attributes use defaults. The conf attribute specifies
33 the configuration in which the dependency should apply. The transitive
34 attribute specifies whether the dependency should also pull in it’s
35 dependencies. It accepts boolean values - true or false. When
36 unspecified Ivy defaults to true.
37
38 POM location can be either a full path to the POM or Ivy file, or a
39 path to the directory containing pom.xml or ivy.xml. If POM location is
40 not given then pom.xml or ivy.xml from current working directory is
41 used. When both pom.xml and ivy.xml are present, pom.xml is processed.
42 You can specify more file locations which will be processed.
43
44 Extra XML is additional XML code to be added into the <dependency>
45 node. This parameter can be ommited, in which case no extra XML is
46 appended.
47
49 %pom_add_dep foo:bar baz - this call adds dependency on artifact
50 foo:bar to baz/pom.xml file.
51
53 Written by Mikolaj Izdebski.
54
56 Bugs should be reported through Java Packages Tools issue tracker at
57 Github: https://github.com/fedora-java/javapackages/issues.
58
60 pom_add_parent(7), pom_add_plugin(7), pom_disable_module(7),
61 pom_remove_dep(7), pom_remove_parent(7), pom_remove_plugin(7),
62 pom_change_dep(7), pom_set_parent(7), pom_xpath_inject(7),
63 pom_xpath_remove(7), pom_xpath_replace(7), pom_xpath_set(7).
64
65
66
67JAVAPACKAGES 08/06/2018 POM_ADD_DEP(7)