<?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.0.1.21</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>

        <!-- transport dependencies -->
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.ssl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.kaazing</groupId>
            <artifactId>gateway.transport.wsr</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.wsr</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>
    </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>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.kaazing</groupId>
                <artifactId>unpack-bower-dependency-maven-plugin</artifactId>
                <version>1.0.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <bowerDependencies>
                        <bowerDependency>
                            <name>command-center</name>
                            <location>https://github.com/kaazing/bower-kaazing-command-center</location>
                            <version>[5.0.0,5.1.0]</version>
                        </bowerDependency>
                    </bowerDependencies>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.google.code.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <includes>
                        <include>src/**</include>
                    </includes>
                    <excludes>
                        <exclude>**/3RDPARTY.txt</exclude>
                        <exclude>**/NOTICE.txt</exclude>
                        <exclude>**/README.txt</exclude>
                        <exclude>**/*.db</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </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>
        </plugins>
    </build>

    <properties>
        <keywords>HTML5,Kaazing,WebSocket,Gateway,Installer</keywords>
        <comments>(c) 2007-2014 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-gateway-community-${project.version}</gateway.edition.directory>
        <minimum.java.version>Java 7 (version 1.7.0_21)</minimum.java.version>
    </properties>
</project>
