>>>>> Jean-Baptiste Onofre <[email protected]>:

> To force config before the component, you need prerequisite=true.
> Can you try:

> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"; 
> name="oldalbum.roleadder.test">
>     <feature name="${karaf-feature-name}-config">
>         <config 
> name="no.priv.bang.oldalbum.roleadder.test.ShiroRoleAdderForOldalbumTestEnvironment">
>             username=${env:USERNAME:-admin}
>             password=${env:PASSWORD:-admin}
>             allowModify=${env:ALLOW_MODIFY:-true}
>         </config>
>     </feature>
>     <feature name="${karaf-feature-name}">
>         <feature prerequisite="true">${karaf-feature-name}-config</feature>
>         <feature>scr</feature>
>     </feature>
> </features>

Still no luck, unfortunately.

Even with prerequisite="true" in place, the initial startup config comes
up empty.

But when the .cfg file is in place in the etc directory, the injected
config is correct.

But except for a minor annoyance I can work around this: the place I
need the config is in the docker image and there I can copy in the
no.priv.bang.oldalbum.roleadder.test.ShiroRoleAdderForOldalbumTestEnvironment.cfg
file into the etc directory when building the image.

FWIW I have to do the same thing for the jdbc-config config
files. I.e. copy the file into the etc directory when buildign the
image.

Thanks!

Reply via email to