<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015-2016 Red Hat, Inc, and individual contributors.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>22</version>
    </parent>

    <groupId>org.jboss.hal</groupId>
    <artifactId>hal-parent</artifactId>
    <version>0.9.0</version>
    <name>HAL :: Parent :: Aggregator</name>
    <description>The WildFly / EAP management console</description>
    <url>http://hal.github.io/</url>
    <packaging>pom</packaging>

    <organization>
        <name>JBoss, a division of Red Hat</name>
        <url>http://www.jboss.org</url>
    </organization>

    <developers>
        <developer>
            <name>Harald Pehl</name>
            <id>hpehl</id>
            <email>hpehl@redhat.com</email>
            <organization>Red Hat</organization>
            <timezone>+1</timezone>
            <roles>
                <role>Lead</role>
            </roles>
        </developer>
        <developer>
            <name>Claudio Miranda</name>
            <id>claudio4j</id>
            <email>claudio@redhat.com</email>
            <organization>Red Hat</organization>
            <timezone>-3</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git@github.com:hal/hal.next.git</connection>
        <developerConnection>scm:git:git@github.com:hal/hal.next.git</developerConnection>
        <url>git@github.com:hal/hal.next.git</url>
    </scm>

    <issueManagement>
        <system>jira</system>
        <url>https://issues.jboss.org/browse/HAL</url>
    </issueManagement>

    <properties>
        <grunt-task>dev</grunt-task>
        <gwt.draftCompile>true</gwt.draftCompile>
        <gwt.failOnError>true</gwt.failOnError>
        <gwt.logLevel>INFO</gwt.logLevel>
        <gwt.namespace>NONE</gwt.namespace>
        <gwt.optimize>0</gwt.optimize>
        <gwt.style>PRETTY</gwt.style>
        <hal.version>${project.version}</hal.version>

        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <plugin.docker.version>0.17.1</plugin.docker.version>
        <plugin.download.version>1.3.0</plugin.download.version>
        <plugin.frontend.version>1.4</plugin.frontend.version>
        <plugin.gwt.version>1.0-rc-7</plugin.gwt.version>
        <plugin.processor.version>3.2.0</plugin.processor.version>
        <plugin.swarm.version>40</plugin.swarm.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <theme.name>hal</theme.name>
    </properties>

    <modules>
        <module>app</module>
        <module>ballroom</module>
        <module>bom</module>
        <module>core</module>
        <module>config</module>
        <module>dmr</module>
        <module>fraction</module>
        <module>json</module>
        <module>meta</module>
        <module>npm</module>
        <module>parent-with-dependencies</module>
        <module>parent-with-gwt</module>
        <module>processors</module>
        <module>resources</module>
        <module>spi</module>
        <module>standalone</module>
        <module>themes</module>
    </modules>

    <build>
        <pluginManagement>
            <!-- All plugins ordered by short name -->
            <plugins>
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <version>${plugin.docker.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.googlecode.maven-download-plugin</groupId>
                    <artifactId>download-maven-plugin</artifactId>
                    <version>${plugin.download.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${plugin.frontend.version}</version>
                </plugin>
                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${plugin.gwt.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.bsc.maven</groupId>
                    <artifactId>maven-processor-plugin</artifactId>
                    <version>${plugin.processor.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>wildfly-swarm-fraction-plugin</artifactId>
                    <version>${plugin.swarm.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <debug>true</debug>
                    <detectLinks>true</detectLinks>
                    <excludePackageNames>org.jboss.hal.processor:org.jboss.hal.processor.mbui</excludePackageNames>
                    <links>
                        <link>http://www.gwtproject.org/javadoc/latest/</link>
                    </links>
                    <tags>
                        <tag>
                            <name>example</name>
                            <placement>tcmf</placement>
                            <head>Example</head>
                        </tag>
                    </tags>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unit-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>docker</id>
            <modules>
                <module>docker</module>
            </modules>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <gwt.draftCompile>false</gwt.draftCompile>
                <gwt.namespace>PACKAGE</gwt.namespace>
                <!--
                    Do not optimize: It will wipe out code which actually must not be erased (like the
                    org.jboss.hal.ballroom.dragndrop.DragEvent.dataTransfer parameter of the onDrop event handler)
                    TODO Check if this is a bug in GWT or how much we can optimize until the code is removed.
                -->
                <gwt.optimize>0</gwt.optimize>
                <gwt.style>OBFUSCATED</gwt.style>
                <grunt-task>prod</grunt-task>
            </properties>
        </profile>
        <profile>
            <id>theme-eap</id>
            <properties>
                <theme.name>eap</theme.name>
            </properties>
        </profile>
        <profile>
            <id>theme-hal</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <theme.name>hal</theme.name>
            </properties>
        </profile>
        <profile>
            <id>theme-wildfly</id>
            <properties>
                <theme.name>wildfly</theme.name>
            </properties>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>google-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>jboss-nexus</id>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-plugins</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
</project>