<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">
    <parent>
        <groupId>org.jboss.as</groupId>
        <artifactId>jboss-as-console-build</artifactId>
        <version>2.9.15.Final</version>
        <relativePath />
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.teiid.hal</groupId>
    <artifactId>dist</artifactId>
    <version>3.1.0</version>
    <packaging>war</packaging>
    <name>HAL Release Stream</name>
    <description>HAL release stream master. Implements the assembly.</description>


    <properties>
        <!-- Maven -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Assembly -->
        <assembly.id>overlay</assembly.id>
        <classifier>resources</classifier>
        <module.slot>main</module.slot>

    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-console-core</artifactId>
        </dependency>     
        <dependency>
            <groupId>org.teiid.web-console</groupId>
            <artifactId>teiid-console-gui</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.teiid.web-console</groupId>
            <artifactId>teiid-console-gui</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>teiid-hal-console-${project.version}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
		  <plugin>
		    <groupId>org.codehaus.mojo</groupId>
		    <artifactId>gwt-maven-plugin</artifactId>
		    <configuration>
		      <extraJvmArgs>-Xmx2048M -Xss1024k</extraJvmArgs>
		    </configuration>
		  </plugin>        
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <executions>
                    <execution>
                        <id>process-spi</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <options>
                                <!--
                                    All properties prefixed with 'gwt.' are written into the
                                    generated GWT module (without the 'gwt.' prefix)
                                -->
                                <gwt.hal.version>${project.parent.version}</gwt.hal.version>
                                <gwt.console.core.version>${project.parent.version}</gwt.console.core.version>
                                <!-- Uncomment to get more messages from the annotation processors -->
                                <!--<debug>true</debug>-->
                            </options>
                            <processSourceArtifacts>
                                <processSourceArtifact>org.jboss.as:jboss-as-console-core:sources</processSourceArtifact>
                                <processSourceArtifact>org.teiid.web-console:teiid-console-gui:sources</processSourceArtifact>
                            </processSourceArtifacts>
                            <defaultOutputDirectory>${project.build.directory}/generated-sources/annotations</defaultOutputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/overlay.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>=~=~=~=~= Assembly for :: HAL Console ${project.version} (slot ${module.slot}):: =~=~=~=~=</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>war</directory>
                            <includes>
                                <include>**/*.*</include>
                            </includes>
                        </fileset>
                        <fileset>
                            <directory>gwt-unitCache</directory>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>prepare-package</phase>
                    </execution>
                </executions>
                <configuration>
                    <classesDirectory>war</classesDirectory>
                    <excludes>
                        <exclude>WEB-INF/**</exclude>
                    </excludes>
                    <classifier>${classifier}</classifier>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[1.8,]</version>
                                    <message>*** The build works with JDK 8 only! ***</message>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>product</id>
            <properties>
                <module.slot>eap</module.slot>
            </properties>
        </profile>
        <profile>
            <id>full</id>
            <properties>
                <assembly.id>full-overlay</assembly.id>
                <classifier>full-resources</classifier>
            </properties>
        </profile>
    </profiles>

  <scm>
    <tag>teiid-console-parent-3.1.0</tag>
  </scm>
</project>
