<?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>37</version>
        <relativePath />
    </parent>

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

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

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.findbugs.plugin>3.0.5</version.findbugs.plugin>
        <version.forge>3.9.2.Final</version.forge>
        <version.furnace>2.28.4.Final</version.furnace>
        <version.windup>5.3.0.Final</version.windup>
        <version.keycloak>15.1.1</version.keycloak>
        <version.wildfly>23.0.2.Final</version.wildfly>
        <version.resteasy>3.15.1.Final</version.resteasy>
        <version.jboss.javaee>1.0.1.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>mta-cli</windup.distribution.name>
        <version.hibernate>5.3.20.Final</version.hibernate>
        <version.undertow>2.2.5.Final</version.undertow>
        <version.httpcomponents>4.5.13</version.httpcomponents>
    </properties>

    <scm>
        <tag>5.3.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-pf4</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-jakartaee-8.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.4.1.Final</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian.extension</groupId>
                <artifactId>arquillian-warp</artifactId>
                <version>1.0.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                </exclusions>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-1.2-api</artifactId>
                <version>2.17.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>2.17.1</version>
                <scope>test</scope>
            </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>${version.resteasy}</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>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>3.8.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${version.httpcomponents}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>${version.httpcomponents}</version>
            </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>2.0.1.Final</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.22.1</version>
                    <configuration>
                        <systemPropertyVariables>
                            <wildfly.version>${version.wildfly}</wildfly.version>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.1</version>
                    <configuration>
                        <systemPropertyVariables>
                            <wildfly.version>${version.wildfly}</wildfly.version>
                        </systemPropertyVariables>
                    </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>
