<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2022 Red Hat

     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

         https://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.hal</groupId>
        <artifactId>hal-parent</artifactId>
        <version>3.7.9.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>hal-code-parent</artifactId>
    <packaging>pom</packaging>
    <name>HAL :: Code Parent</name>
    <description>Parent for modules with code. Contains dependencies and plugin management</description>

    <dependencyManagement>
        <dependencies>
            <!-- HAL -->
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>hal-bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- GWT -->
            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt</artifactId>
                <version>${version.gwt}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-core</artifactId>
                <version>${version.elemental}</version>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-dom</artifactId>
                <version>${version.elemental}</version>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-promise</artifactId>
                <version>${version.elemental}</version>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-webstorage</artifactId>
                <version>${version.elemental}</version>
            </dependency>
            <dependency>
                <groupId>com.google.jsinterop</groupId>
                <artifactId>base</artifactId>
                <version>${version.jsinterop}</version>
            </dependency>
            <dependency>
                <groupId>com.gwtplatform</groupId>
                <artifactId>gwtp-all</artifactId>
                <version>${version.gwtp}</version>
            </dependency>
            <dependency>
                <groupId>com.gwtplatform</groupId>
                <artifactId>gwtp-processors</artifactId>
                <version>${version.gwtp}</version>
            </dependency>
            <dependency>
                <groupId>com.google.gwt.inject</groupId>
                <artifactId>gin</artifactId>
                <version>${version.gin}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.elemento</groupId>
                <artifactId>elemento-core</artifactId>
                <version>${version.elemento}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Annotation Processing -->
            <dependency>
                <groupId>org.jboss.auto</groupId>
                <artifactId>apt-tools</artifactId>
                <version>${version.apt.tools}</version>
            </dependency>
            <dependency>
                <groupId>com.google.auto.service</groupId>
                <artifactId>auto-service</artifactId>
                <version>${version.auto.service}</version>
            </dependency>

            <!-- Misc -->
            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-dmr</artifactId>
                <version>${version.jboss.dmr}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.guava}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava-gwt</artifactId>
                <version>${version.guava}</version>
            </dependency>
            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>jdom</artifactId>
                <version>${version.jdom}</version>
            </dependency>
            <dependency>
                <groupId>jaxen</groupId>
                <artifactId>jaxen</artifactId>
                <version>${version.jaxen}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>ru.finam</groupId>
                <artifactId>slf4j-gwt</artifactId>
                <version>${version.slf4j.gwt}</version>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.mockito}</version>
            </dependency>
            <dependency>
                <groupId>com.google.testing.compile</groupId>
                <artifactId>compile-testing</artifactId>
                <version>${version.compile.testing}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Ordered by artifactID -->
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <configuration>
                        <configFile>etc/eclipse-formatter-config.xml</configFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>hal-build-config</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <configuration>
                        <licenseSets>
                            <licenseSet>
                                <header>etc/license.txt</header>
                            </licenseSet>
                        </licenseSets>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>hal-build-config</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <suppressionsLocation>etc/checkstyle-suppressions.xml</suppressionsLocation>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>hal-build-config</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Ordered by artifactID -->
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>formatter-format</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>formatter-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>impsort-sort</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>impsort-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>checkstyle-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
