<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>ru.entaxy.esb</groupId>
        <artifactId>root</artifactId>
        <version>1.8.2.2</version>
    </parent>

    <groupId>ru.entaxy.esb.system</groupId>
    <artifactId>system-parent</artifactId>
    <packaging>pom</packaging>

    <name>SYSTEM :: ENTAXY</name>
    <description>SYSTEM :: ENTAXY</description>


    <modules>
        <module>core</module>
        <module>commons</module>
        <module>auth</module>
        <module>registry</module>
        <module>system-management</module>
    </modules>
    
    <build>
    </build>
    
    <profiles>
    	<profile>
    		<id>system-cfg-install</id>
    		<activation>
    			<file>
    				<exists>src/main/cfg/ru.entaxy.esb.cfg</exists>
    			</file>
    		</activation>
    		<build>
		        <resources>
		            <resource>
		                <directory>src/main/features</directory>
		                <filtering>true</filtering>
		                <targetPath>${project.build.directory}/features</targetPath>
		            </resource>
		            <resource>
		                <directory>src/main/cfg</directory>
		                <filtering>true</filtering>
		                <targetPath>${project.build.directory}/cfg</targetPath>
		            </resource>
		        </resources>
		        <plugins>
		            <plugin>
		                <groupId>org.apache.maven.plugins</groupId>
		                <artifactId>maven-resources-plugin</artifactId>
		                <executions>
		                    <execution>
		                        <goals>
		                            <goal>resources</goal>
		                        </goals>
		                    </execution>
		                </executions>
		            </plugin>
		            <plugin>
		                <groupId>org.codehaus.mojo</groupId>
		                <artifactId>build-helper-maven-plugin</artifactId>
		                <executions>
		                    <execution>
		                        <id>attach-artifacts</id>
		                        <phase>package</phase>
		                        <goals>
		                            <goal>attach-artifact</goal>
		                        </goals>
		                        <configuration>
		                            <artifacts>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.deployer.cellar.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.deployer.cellar</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.deployer.file.system.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.deployer.file.system</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.deployer.nexus.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.deployer.nexus</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.error.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.error</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.error.code.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.error.code</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.error.text.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.error.text</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.system.basic_auth.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.system.basic_auth</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.system.basic_auth.htpasswd.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.system.basic_auth.htpasswd</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.system.event.handler.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.system.event.handler</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.system.event.rest.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.system.event.rest</classifier>
		                                </artifact>
		                                <artifact>
		                                    <file>target/cfg/ru.entaxy.esb.system.management.cfg</file>
		                                    <type>cfg</type>
		                                    <classifier>ru.entaxy.esb.system.management</classifier>
		                                </artifact>
		                            </artifacts>
		                        </configuration>
		                    </execution>
		                </executions>
		            </plugin>
		        </plugins>
    		</build>
    	</profile>
    </profiles>
    
</project>
