write_pom: Write a Super Simple POM

Description Usage Arguments Details

View source: R/build_classpath.R

Description

mvn dependency:build-classpath only works with a pom.xml - so this function writes a pom to make maven happy. This can also be handy if you want to use build_classpath_from_pom with a package and you need to actually compose a pom.xml to do that.

Usage

1
2
3
4
5
6
7
write_pom(
  deps,
  path = tempdir(),
  artifact_id = "temp-proj",
  group_id = "temp-group",
  version = "0.0.1-SNAPSHOT"
)

Arguments

path

Character. The path to write the pom.xml file

artifact_id

Character. The name of your project

group_id

Character. Typically the name of your organization

version

Character. Some version number.

Details

Note that artifact_id, group_id, and version are required to write a pom file, but have no practical meaning here since this pom should never be deployed anywhere (for other things to rely on it). It is really just a mechanism for specifying dependencies.

If you need more complicated pom settings (e.g., an excludes section) you need to write that manually, or use some other tool to create your pom.xml. This function is not doing anything smart. It just tries to write a valid pom to specify dependencies for maven to resolve.


mitre/mvndeps documentation built on Feb. 18, 2020, 6:13 p.m.