Class DefaultPluginsDir
java.lang.Object
org.apache.tika.pipes.core.config.DefaultPluginsDir
Resolves the default
plugins directory when plugin-roots
is not configured (TIKA-4864). The probe order matches the install
layouts Tika ships:
- next to the jar the anchor class was loaded from (a flat install, tika-grpc's docker image);
- next to that directory's parent (the unpacked distributions and the
tika-server docker image load classes from
lib/, the plugins sit besidelib/); - a
pluginsdirectory in the current working directory.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
PLUGINS_DIR_NAME
The directory name probed in each location.- See Also:
-
-
Method Details
-
resolve
Resolves the default plugins directory for the install layout of the given class.- Parameters:
anchor- the class whose code source anchors the probe, usually the caller- Returns:
- the absolute path of the first
pluginsdirectory found, or the absolute path ofpluginsin the working directory if none exists yet
-
resolve
The probe itself, separated from the code-source lookup for testing.- Parameters:
codeSourceDir- the directory holding the anchor's jar, or nullcwd- the working directory to fall back to- Returns:
- the absolute path of the resolved directory
-