Skip to content

Allow users to share the template/keys config element between templates #13

Description

@looztra

For the moment, when you have more than one templates you have to repeat the "keys" section for all of them

            <plugin>
                <groupId>com.github.nodevops</groupId>
                <artifactId>confd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- common step shared by all profiles that prepare the config file for further usage /-->
                        <id>prepare</id>
                        <goals>
                            <goal>prepare</goal>
                        </goals>
                        <configuration>
                            <forceDestToLocalFileSystemType>true</forceDestToLocalFileSystemType>
                            <templates>
                                <template>
                                    <id>application.properties</id>
                                    <src>src/main/confd/templates/application.properties.tmpl</src>
                                    <dest>${project.basedir}/target/generated-configuration/application.properties</dest>
                                    <keys>
                                        <value>/web</value>
                                        <value>/shared</value>
                                        <value>/runtime</value>
                                    </keys>
                                </template>
                                <template>
                                    <id>hazelcast-client.xml</id>
                                    <src>src/main/confd/templates/hazelcast-client.xml.tmpl</src>
                                    <dest>${project.basedir}/target/classes/hazelcast-client.xml</dest>
                                    <keys>
                                        <value>/web</value>
                                        <value>/shared</value>
                                        <value>/runtime</value>
                                    </keys>
                                </template>
                            </templates>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

It may be nice to be able to declare the keys once (associated with an id?) and reference them in the template config element

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions