Plugin directory structure preservation¶
Plugin directory structure preservation is a mechanism or strategy where the internal file hierarchy of a software plugin remains intact and accessible within the target environment, rather than being extracted or flattened during deployment. This approach is typically relevant in contexts involving embedded scripting languages or modular application architectures where the physical file layout supports the logical structure of the code.
Implementation Details¶
When a plugin utilizes an embedded script interpreter—such as the JSR-223 compliant engine often found in Java applications—the plugin's internal scripts can reference one another using relative paths.^[400-devops__09-Scripting-Language__31-kotlin__kotlin.md]
For instance, a "main" script located within the plugin directory can load a library or helper module by specifying a relative file path (e.g., ./lib/helper.js).^[400-devops__09-Scripting-Language__31-kotlin__kotlin.md]
Requirements¶
To support relative path resolution and script inter-dependency, the directory structure of the plugin must be preserved on the filesystem.^[400-devops__09-Scripting-Language__31-kotlin__kotlin.md]
This preservation is critical because the embedded engine relies on the filesystem to resolve and execute the included scripts correctly based on their defined relative locations.^[400-devops__09-Scripting-Language__31-kotlin__kotlin.md]
Related Concepts¶
- [[JSR-223]]
- [[Embedded Scripting Language]]