<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.kaazing</groupId>
        <artifactId>gateway</artifactId>
        <version>5.2.2</version>
    </parent>

    <artifactId>gateway.distribution</artifactId>
    <packaging>pom</packaging>

    <name>Kaazing Gateway Distribution</name>
    <description>A packaged and runnable .tar/.zip of the gateway</description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.kaazing</groupId>
                <artifactId>gateway.bom</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.truststore</artifactId>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.amqp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.server.api</artifactId>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.server.spi</artifactId>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.bridge</artifactId>
        </dependency>

        <!-- Command Center / Management -->
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>snmp4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>snmp4j-agent</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>sigar.dist</artifactId>
            <classifier>distribution</classifier>
            <type>zip</type>
        </dependency>
        <!-- service dependencies -->
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.echo</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.broadcast</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.proxy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.http.balancer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.http.directory</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.http.proxy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.update.check</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.update.check.management</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.turn.proxy</artifactId>
        </dependency>

        <!-- transport dependencies -->
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.ssl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.wseb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.wsn</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.ws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.sse</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.pipe</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.nio</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.bio</artifactId>
        </dependency>

        <!-- resource address dependencies -->
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.ws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.ssl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.tcp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.wsn</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.httpxe</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.wsdraft</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.wsxdraft</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.pipe</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.sse</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.wsx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.httpx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.httpxdraft</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.rtmp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.udp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.resource.address.wse</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.service.turn.rest</artifactId>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xmlbeans-maven-plugin</artifactId>
                    <version>2.3.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.5.1</version>
                    <!-- turn off warnings about file lengths > 100 chars -->
                    <configuration>
                        <tarLongFileMode>gnu</tarLongFileMode>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <!-- We need to retrieve the system-dependent library parts of the SIGAR ZIP -->
                    <execution>
                        <id>unpack-sigar</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>sigar.dist</includeArtifactIds>
                            <includeTypes>zip</includeTypes>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <silent>false</silent>
                            <outputDirectory>target/sigar</outputDirectory>
                            <excludes>**/log4j.jar</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <filters>
                        <filter>${basedir}/src/main/assembly/filter.properties</filter>
                    </filters>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <finalName>${gateway.edition.directory}</finalName>
                            <descriptors>
                                <descriptor>src/main/assembly/unix-bin.xml</descriptor>
                                <descriptor>src/main/assembly/windows-bin.xml</descriptor>
                            </descriptors>
                            <tarLongFileMode>posix</tarLongFileMode>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <excludes combine.children="append">
                        <exclude>src/main/gateway/web/**/*</exclude>
                    </excludes>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <properties>
        <keywords>HTML5,Kaazing,WebSocket,Gateway,Installer</keywords>
        <comments>(c) 2007-2015 Kaazing Corporation</comments>
        <edition>Community Edition Gateway</edition>

        <!-- gateway.feature.version supplies a 2-digit version of the major/minor version of the Gateway. -->
        <gateway.feature.version>${project.version}</gateway.feature.version>
        <gateway.edition.directory>kaazing-community-gateway-${project.version}</gateway.edition.directory>
        <minimum.java.version>Java 7 (version 1.7.0_21)</minimum.java.version>
        <gateway.version>${project.version}</gateway.version>
    </properties>
</project>
