Downloads MPXJ and keeps its jars in a local directory.
MPXJ isn't bundled with this library. The first time it's needed, the official distribution for the configured version is downloaded from the MPXJ releases, verified, and only its jars are kept (about 30 MB).
Configuration
config :mpxj_ex,
# MPXJ version to download
version: "16.10.0",
# Where the jars live. Defaults to a per-version directory in the
# user cache dir. Can also be set with MPXJ_EX_JAR_DIR.
jar_dir: "/opt/mpxj",
# Download MPXJ on first use. Set to false in production and run
# `mix mpxj_ex.install` at build time instead.
auto_install: trueTo use an MPXJ you installed yourself, point jar_dir at a directory
containing mpxj.jar and its dependencies.
Summary
Functions
@spec ensure_installed() :: :ok | {:error, MpxjEx.Error.t()}
Makes sure MPXJ is installed, downloading it when auto_install is enabled.
@spec install(keyword()) :: :ok | {:error, MpxjEx.Error.t()}
Downloads MPXJ and extracts its jars into jar_dir/0, replacing any existing install.
Options
@spec installed?() :: boolean()
Returns true when MPXJ is available in jar_dir/0.
@spec jar_dir() :: Path.t()
The directory holding mpxj.jar and its dependencies.
@spec version() :: String.t()
The MPXJ version in use.