ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert M. Mather" <robert.mather....@gmail.com>
Subject Some clarifications about ACE template config engine
Date Sat, 21 Mar 2015 04:25:55 GMT
Trying to clarify how to use ACE for provisioning configuration along with
bundles.

Using the template engine
<https://ace.apache.org/docs/user-guide.html#using-the-template-engine-for-targets>,
would a metatype.xml inside a bundle (ie in the OSGI-INF/metatype
directory, per the spec) be processed and the variables substituted, or
does the metatype need to be deployed as a separate artifact.

Just for my understanding, where does the interpolation actually take
place? I've been assuming it's a process at the client/target...

If the same "tag" key gets set at multiple stages (ie artifact, feature,
dist, and/or target), is the a "last one wins" rule or something when the
interpolation takes place?

And finally, is this example metatype.xml the right idea for adding the
${context.blah} variables (in the content field)?

<?xml version="1.0" encoding="UTF-8"?><metatype:MetaData
xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.1.0">
    <OCD id="ocd" name="ocd">
        <AD id="server" type="String" />
    </OCD>

    <Designate pid="org.amdatu.conf" bundle="org.amdatu.sample.bundle">
        <Object ocdref="ocd">
            <Attribute adref="server" name="serverurl"
content="${context.serverUrl}" />
        </Object>
    </Designate></metatype:MetaData>


I'm using declarative services with bnd(tools), which is generating
metatype from my @OCD annotated interfaces, so I'm trying to find the
best/most automated way to prepare those for Apache ACE with template
variables.

Any thoughts on the right way to do that would be much appreciated, I'm
hoping I'm not the first person to want to do something like this!

Thanks,

Robert

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message