<?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.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>22</version>
        <relativePath />
    </parent>

    <groupId>org.jboss.windup.web</groupId>
    <artifactId>windup-web-parent</artifactId>
    <version>4.2.0.Final</version>
    <packaging>pom</packaging>

    <name>Windup Web - Parent</name>
    <description>Migration Tools Web Interface</description>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <version.findbugs.plugin>3.0.5</version.findbugs.plugin>
        <version.forge>3.7.2.Final</version.forge>
        <version.furnace>2.26.2.Final</version.furnace>
        <version.windup>4.2.0.Final</version.windup>
        <version.keycloak>2.5.5.Final</version.keycloak>
        <version.resteasy>3.0.19.Final</version.resteasy>
        <version.jboss.javaee>1.0.3.Final</version.jboss.javaee>

        <windup.web.scm.connection>scm:git:https://github.com/windup/windup-web.git</windup.web.scm.connection>
        <windup.web.developer.connection>scm:git:git@github.com:windup/windup-web.git</windup.web.developer.connection>
        <windup.web.scm.url>http://github.com/windup/windup-web</windup.web.scm.url>

        <windup.distribution.name>rhamt-cli</windup.distribution.name>
    </properties>

    <scm>
        <tag>4.2.0.Final</tag>
        <connection>${windup.web.scm.connection}</connection>
        <developerConnection>${windup.web.developer.connection}</developerConnection>
        <url>${windup.web.scm.url}</url>
    </scm>

    <issueManagement>
        <system>JBoss Jira</system>
        <url>https://issues.jboss.org/browse/WINDUP</url>
    </issueManagement>
    <mailingLists>
        <mailingList>
            <name>Windup Usage and Rules Development</name>
            <post>windup-users@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-users/</archive>
        </mailingList>
        <mailingList>
            <name>Windup Core Development</name>
            <post>windup-dev@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/windup-dev/</archive>
        </mailingList>
    </mailingLists>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <modules>
        <module>addons</module>
        <module>model</module>
        <module>executor</module>
        <module>furnace-service-provider</module>
        <module>tsmodelsgen-maven-plugin</module>
        <module>tsmodelsgen-invocation</module>
        <module>tests</module>
        <module>services</module>
        <module>ui</module>
        <module>ear</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.windup</groupId>
                <artifactId>windup-bom</artifactId>
                <version>${version.windup}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec</groupId>
                <artifactId>jboss-javaee-7.0</artifactId>
                <version>${version.jboss.javaee}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>1.1.11.Final</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-warp</artifactId>
                <version>1.0.0.Alpha7</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-rest-warp-bom</artifactId>
                <version>1.0.0.Alpha4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-multipart-provider</artifactId>
                <version>3.0.19.Final</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-client</artifactId>
                <version>${version.resteasy}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jsapi</artifactId>
                <version>${version.resteasy}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jaxb-provider</artifactId>
                <version>${version.resteasy}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jackson2-provider</artifactId>
                <version>${version.resteasy}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-drone-bom</artifactId>
                <version>2.0.0.Beta1</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.graphene</groupId>
                <artifactId>graphene-webdriver</artifactId>
                <version>2.0.3.Final</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.selenium</groupId>
                <artifactId>selenium-bom</artifactId>
                <version>2.52.0</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=768m -XX:ReservedCodeCacheSize=128m</argLine>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-maven-plugin</artifactId>
                    <version>1.2.2.Final</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <compilerVersion>${maven.compiler.target}</compilerVersion>
                        <source>${maven.compiler.target}</source>
                        <target>${maven.compiler.target}</target>
                        <encoding>UTF-8</encoding>
                        <meminitial>128m</meminitial>
                        <maxmem>512m</maxmem>
                        <fork>true</fork>
                        <compilerArgs>
                            <arg>-J-Xss4m</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <profiles>
        <profile>
            <id>graph-tool</id>

            <modules>
                <module>tools/graph-tool</module>
            </modules>
        </profile>

        <!-- profile primary for CI, but using locally is good too -->
        <profile>
            <id>findbugs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>${version.findbugs.plugin}</version>
                        <configuration>
                            <!--
                                Enables analysis which takes more memory but finds more bugs.
                                If you run out of memory, changes the value of the effort element
                                to 'Low'.
                            -->
                            <effort>Max</effort>
                            <!-- Build doesn't fail if problems are found -->
                            <failOnError>false</failOnError>
                            <!-- Reports all bugs (other values are medium and max) -->
                            <threshold>Low</threshold>
                            <!-- Produces XML report -->
                            <xmlOutput>true</xmlOutput>
                            <!-- Configures the directory in which the XML report is created -->
                            <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
                            <onlyAnalyze>org.jboss.windup.*</onlyAnalyze>
                            <maxHeap>1024</maxHeap>
                        </configuration>
                        <executions>
                            <!-- Ensures that FindBugs inspects source code when project is compiled.-->
                            <execution>
                                <id>analyze-compile</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>
</project>
