sviperll/ozymandias

Support substitutions in <profile.depends>...</profile.depends>

Closed this issue · 2 comments

Simply support variable substitutions in the properties used to control maven-profiledep-extension, so it is possible to write something like:

<!-- Platform specific profiles -->
    <profile>
        <id>platform-flags</id>
        <properties>
            <profile.active>true</profile.active>
            <profile.depends>${os.family}-${os.arch}-flags,${os.family}-${os.version}-${os.arch}-flags</profile.depends>
        </properties>
    </profile>
    <profile>
        <id>windows-x86_86-flags</id>
        <properties>
            <profile.provides>osgi-platform</profile.provides>
            <osgi.os>win32</osgi.os>
            <osgi.ws>win32</osgi.ws>
            <osgi.arch>x86_64</osgi.arch>
        </properties>
    </profile>

I'll look into it...

It seems that it's impossible to get interpolated values in profile's properties. It seems that you can only use some interpolation in activation element only.

See maven-model-builder documentation

Notice that model interpolation happens after profile activation, then profile activation doesn't benefit from every values: interpolation for file-based activation is limited to ${basedir} (which was introduced in Maven 3 and is not deprecated in this context), System properties and request properties.