Re: Dynamically registering a WAB

2023-02-12 Thread Grzegorz Grzybek
Hello If you need only static resources, maybe you should simply register Whiteboard-based resources? Something like this: register a context to "get" a context path: Dictionary properties = new Hashtable<>(); properties.put("osgi.http.whiteboard.context.name", "my-context");

Re: Dynamically registering a WAB

2023-02-12 Thread Andrew Lienhard
This seems to be the most promising approach. Repackage the WAB as a WAR then deploy it at runtime as shown below. The URL parameters will assist the OSGI Web URL Handler in automagically producing a WAB + MANIFEST.MF with the correct web-contextpath header. Only I need to do it using the

Dynamically registering a WAB

2023-02-12 Thread Andrew Lienhard
I have a WAB in a karaf container that I need to deploy using a context path based on environment variables (k8s helm). Currently its web-ContextPath is hardcoded in a pom.xml, so it's compile-time only which won't work for our deployments. I'm wondering if it's possible to register this WAB

dynamically register a WAB in a OSGi environment

2023-02-12 Thread Andrew Lienhard
I have a static web directory being served inside a unomi container as a WAB and I need to be able to deploy it with a context path based on environment variables instead of a hardcoded path. We currently set the web-ContextPath for this WAB in a pom.xml, so it's compile-time only which won't