Learn R Programming

rscala (version 3.2.18)

scalaDevelDownloadJARs: Download and Deploy JAR Files into the Package File System

Description

This function only takes effect during package installation. It is meant to be called from bare code of a package that depends on rscala in a script such as zzz.R. When called during package installation, it downloads JAR files to the appropriate directories. This avoids the need to distribute some JAR files in the source package.

Usage

scalaDevelDownloadJARs(
  description,
  scalaMajorVersion = "",
  prefix = "https://search.maven.org/remotecontent?filepath="
)

Arguments

description

A character vector describing the JAR files to download, e,g. "org.apache.commons:commons-math3:3.6.1".

scalaMajorVersion

A Scala major version, such as "2.13", if the JAR should be placed in a directory specific to a Scala version. Otherwise, "" is used to specify a general installation.

prefix

A string giving the prefix of the download URL.

Examples

Run this code
# NOT RUN {
## To be run in bare code of a package that depends on rscala and needs,
## for example, the Apache Commons Math Library.
rscala::scalaDevelDownloadJARs("org.apache.commons:commons-math3:3.6.1")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab