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 work for our deployments.
I'm wondering if we can register this dynamically instead as we would a
servlet using HttpService and/or pax-web. I've been digging through the
documentation and examples but I've haven't been able to work it out. Is
this doable? If so, are there any examples of this? Ultimately, I don't
care what form the service takes as long as it can serve static files from
a directory.
clip from the pom.xml
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<_wab>src/main/webapp</_wab>
<Include-Resource>{maven-resources},OSGI-INF/blueprint/blueprint.xml=${project.build.directory}/classes/OSGI-INF/blueprint/blueprint.xml</Include-Resource>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>WEB-INF/lib</Embed-Directory>
<Web-ContextPath>/</Web-ContextPath>
</instructions>
</configuration>
</plugin>
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ops4j/bdb6730d-1ef6-48fb-b69c-5246bf2e5448n%40googlegroups.com.