<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.bonitasoft.platform</groupId>
        <artifactId>bonita-platform</artifactId>
        <version>7.3.3</version>
    </parent>

    <artifactId>platform-resources</artifactId>

    <properties>
        <engine.properties.source>${project.basedir}/../../community/bpm/bonita-core/bonita-process-engine/src/main/resources</engine.properties.source>
        <generated.resources.root>src/generated/resources</generated.resources.root>
    </properties>
    <organization>
        <name>Bonitasoft</name>
        <url>http://community.bonitasoft.com</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License Version 2.1</name>
            <url>http://www.gnu.org/licenses/lgpl.html</url>
        </license>
    </licenses>

    <build>
        <resources>
            <resource>
                <directory>${generated.resources.root}</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>copy-engine-props</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <inherited>false</inherited>
                        <configuration>
                            <target>
                                <copy file="${engine.properties.source}/bonita-platform-community.properties" toFile="${generated.resources.root}/platform_engine/bonita-platform-community-custom.properties">
                                    <filterchain>
                                        <filterreader classname="org.apache.tools.ant.filters.PrefixLines">
                                            <param name="prefix" value="#" />
                                        </filterreader>
                                    </filterchain>
                                </copy>
                                <copy file="${engine.properties.source}/bonita-platform-init-community.properties" toFile="${generated.resources.root}/platform_init_engine/bonita-platform-init-community-custom.properties">
                                    <filterchain>
                                        <filterreader classname="org.apache.tools.ant.filters.PrefixLines">
                                            <param name="prefix" value="#" />
                                        </filterreader>
                                    </filterchain>
                                </copy>
                                <copy file="${engine.properties.source}/bonita-tenant-community.properties" toFile="${generated.resources.root}/tenant_template_engine/bonita-tenant-community-custom.properties">
                                    <filterchain>
                                        <filterreader classname="org.apache.tools.ant.filters.PrefixLines">
                                            <param name="prefix" value="#" />
                                        </filterreader>
                                    </filterchain>
                                </copy>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
