Blueprint Developer Manual / Version 2101
Table Of Contents
The Studio Client app supports dynamic packages that can be added without rebuilding the app itself.
When dynamic packages were introduced, you still had to create an "application
overlay" Maven module (packaging type jangaroo-app-overlay
) to add dynamic packages. This
is how the studio-app
module in the Blueprint workspace adds all dynamic packages to
studio-base-app
.
However, using application overlays is not flexible enough for plugins,
so the mechanism to "discover" dynamic packages has been enhanced. To use this enhanced mechanism, you
can just use the Maven archetype described in Section 4.1.6.2.2, “Maven Archetype”
and the Docker image created by the apps/studio-client
workspace, and it will work out of the box. Read on if you'd like a deeper understanding of how plugin
(or to be more precise: dynamic package) discovery in Studio Client works, for example for debugging purpose in case
your plugin does not load.
The package loading of the studio-app has been extended to look for additional packages
at the URL path /additional-packages/
. There, it expects a directory listing from the web server.
Currently the only supported format is the JSON format of the
NGINX autoindex module.
The Studio Client Docker image contains an Nginx server with the necessary configuration.
To support multiple additional package directories, the package discovery protocol expects further subdirectories
at this level, which then contain the content of all package directories of your plugins.
The package loader only uses these paths to find the packages. For the actual loading it expects the packages
themselves to be served at the standard path /packages/
package-name.
This way you can dynamically add packages to your studio-app without rebuilding it, just
with some web server magic.
Example: Packages request mapping
Path | Description |
---|---|
/packages/dynamic-packages.json | Listing of built-in packages |
/packages/additional-packages/ | Directory listing of further package locations |
/packages/additional-packages/plugins/ | Directory listing of packages from the plugins directory |
/packages/additional-packages/plugins/com_acme__myplugin | An additional package from the plugins directory |
/packages/additional-packages/more-plugins/ | Directory listing of packages from the directory more-plugins |
/packages/com_coremedia__a_built_in_package | Built-in packages are loaded from /packages/ |
/packages/com_acme__myplugin | Additional packages are also loaded from /packages/ ;
the web server also looks at the plugins directory and will deliver
/packages/additional-packages/plugins/com_acme__myplugin
|
Table 4.1. Packages request mapping
The Studio Client NGINX image configures NGINX to create directory listings for
the path /additional-packages/
and /additional-packages/plugins/
.
Additionally, the /packages/
location is extended to also try the
/additional-packages/plugins/
path.
This way a Studio Client container will automatically load all packages from the
directory mounted at /coremedia/additional-packages/plugins/
.