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

    JBoss, Home of Professional Open Source.
    Copyright 2017 Red Hat, Inc., and individual contributors
    as indicated by the @author tags.

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

    <groupId>org.jboss.pnc.bacon</groupId>
    <artifactId>parent</artifactId>
    <version>2.1.11</version>
    <packaging>pom</packaging>

    <name>bacon</name>
    <description>PNC 2.0 CLI</description>
    <url>https://github.com/bacon</url>
    <inceptionYear>2019</inceptionYear>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <organization>RedHat</organization>
            <organizationUrl>http://www.redhat.com</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>auth</module>
        <module>cli</module>
        <module>common</module>
        <module>config</module>
        <module>da</module>
        <module>pig</module>
        <module>pnc</module>
        <module>test-common</module>
        <module>integration-tests</module>
    </modules>

    <scm>
        <connection>scm:git:http://github.com/project-ncl/bacon.git</connection>
        <developerConnection>scm:git:git@github.com:project-ncl/bacon.git</developerConnection>
        <tag>2.1.11</tag>
        <url>http://github.com/project-ncl/bacon</url>
    </scm>

    <properties>
        <compiler.plugin.version>3.8.1</compiler.plugin.version>
        <jackson.version>2.12.4</jackson.version>
        <jaxb.version>2.2.11</jaxb.version>
        <junit.version>5.7.2</junit.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <picocli.version>4.6.1</picocli.version>
        <pme.version>4.5</pme.version>

        <pnc.version>2.1.1</pnc.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <quarkus.resolver.version>2.1.3.Final</quarkus.resolver.version>
        <tagSuffix />
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- modules -->
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>auth</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>cli</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>common</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>config</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>da</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>pig</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>pnc</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- da -->
            <dependency>
                <groupId>org.jboss.da</groupId>
                <artifactId>reports-model</artifactId>
                <version>2.1.1</version>
            </dependency>

            <!-- pnc client -->
            <dependency>
                <groupId>org.jboss.pnc</groupId>
                <artifactId>rest-client</artifactId>
                <version>${pnc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc</groupId>
                <artifactId>dto</artifactId>
                <version>${pnc.version}</version>
            </dependency>
            <dependency>
                <groupId>info.picocli</groupId>
                <artifactId>picocli</artifactId>
                <version>${picocli.version}</version>
            </dependency>
            <dependency>
                <groupId>info.picocli</groupId>
                <artifactId>picocli-shell-jline3</artifactId>
                <version>${picocli.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jline</groupId>
                <artifactId>jline</artifactId>
                <version>3.20.0</version>
            </dependency>
            <dependency>
                <groupId>org.jline</groupId>
                <artifactId>jline-console</artifactId>
                <version>3.20.0</version>
            </dependency>
            <!-- I need this, otherwise the snowdrop dependency overrides the version and it messes things up -->
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jaxrs</artifactId>
                <version>3.14.0.Final</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-client</artifactId>
                <version>3.12.1.Final</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jackson2-provider</artifactId>
                <version>3.12.1.Final</version>
            </dependency>

            <!-- log -->
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>1.2.5</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.2.5</version>
            </dependency>

            <dependency>
                <groupId>org.fusesource.jansi</groupId>
                <artifactId>jansi</artifactId>
                <version>2.3.4</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.32</version>
            </dependency>

            <!-- unirest and family -->
            <dependency>
                <groupId>com.konghq</groupId>
                <artifactId>unirest-java</artifactId>
                <version>3.11.12</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.13</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpasyncclient</artifactId>
                <version>4.1.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>4.5.13</version>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20210307</version>
            </dependency>

            <!-- jackson -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-xml</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!-- pig and others -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>1.9.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>2.0.1.Final</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jgit</groupId>
                <artifactId>org.eclipse.jgit</artifactId>
                <version>5.12.0.202106070339-r</version>
            </dependency>
            <dependency>
                <groupId>me.snowdrop</groupId>
                <artifactId>licenses-generator</artifactId>
                <version>1.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.build.finder</groupId>
                <artifactId>core</artifactId>
                <version>2.0.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.build.finder</groupId>
                <artifactId>report</artifactId>
                <version>2.0.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.21</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant</artifactId>
                <version>1.10.11</version>
            </dependency>
            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>2.3.31</version>
            </dependency>
            <dependency>
                <groupId>org.commonjava.maven.ext</groupId>
                <artifactId>pom-manipulation-cli</artifactId>
                <version>${pme.version}</version>
                <classifier>minimal</classifier>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.commonjava.maven.ext</groupId>
                <artifactId>pom-manipulation-common</artifactId>
                <version>${pme.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- validation -->
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>6.1.5.Final</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.el</artifactId>
                <version>3.0.1-b12</version>
            </dependency>

            <!-- jaxb -->
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
                <version>${jaxb.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>${jaxb.version}</version>
            </dependency>

            <!-- Quarkus bootsrap maven resolver   -->
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-maven-resolver</artifactId>
                <version>${quarkus.resolver.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.slf4j</groupId>
                        <artifactId>slf4j-jboss-logmanager</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.sisu</groupId>
                <artifactId>org.eclipse.sisu.inject</artifactId>
                <version>0.3.4</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.20</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.pnc.bacon</groupId>
                <artifactId>test-common</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>

            <!--tests-->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.20.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-inline</artifactId>
                <version>3.12.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-depchain</artifactId>
                <version>1.2.6</version>
                <type>pom</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                <artifactId>shrinkwrap-resolver-depchain</artifactId>
                <version>3.1.4</version>
                <type>pom</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.tomakehurst</groupId>
                <artifactId>wiremock-jre8</artifactId>
                <version>2.30.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-lambda</artifactId>
                <version>1.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jeasy</groupId>
                <artifactId>easy-random-core</artifactId>
                <version>4.2.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <!--TODO: remove once PNC 2.0 hits central -->
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>jboss-nexus</id>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
        </repository>

        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>Nexus Staging</id>
            <url>https://oss.sonatype.org/content/groups/staging</url>
        </repository>
    </repositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.compiler.plugin}</version>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <testSource>${maven.compiler.source}</testSource>
                        <testTarget>${maven.compiler.target}</testTarget>
                        <compilerArgs>
                            <arg>-Xlint:unchecked</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <createBackupFile>false</createBackupFile>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <expandEmptyElements>false</expandEmptyElements>
                    <keepBlankLines>true</keepBlankLines>
                    <lineSeparator>\n</lineSeparator>
                    <nrOfIndentSpace>4</nrOfIndentSpace>
                    <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
                    <sortDependencies>scope</sortDependencies>
                    <sortModules>false</sortModules>
                    <sortPlugins>scope</sortPlugins>
                    <sortProperties>true</sortProperties>
                    <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                </configuration>
                <executions>
                    <execution>
                        <id>sort-pom</id>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.commonjava.maven.enforcer</groupId>
                        <artifactId>enforce-managed-deps-rule</artifactId>
                        <version>1.3</version>
                    </dependency>
                </dependencies>
                <executions>

                    <execution>
                        <id>no-managed-deps</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <rules>
                                <requireManagedDeps implementation="org.commonjava.maven.enforcer.rule.EnforceManagedDepsRule">
                                    <checkProfiles>true</checkProfiles>
                                    <failOnViolation>true</failOnViolation>
                                    <regexIgnored>
                                        <regexIgnored>[{]</regexIgnored>
                                    </regexIgnored>
                                </requireManagedDeps>
                                <banDuplicatePomDependencyVersions />
                            </rules>
                        </configuration>
                    </execution>

                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <shortRevisionLength>8</shortRevisionLength>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <version>1.6.2</version>
                <configuration>
                    <groups>*,javax.,java.</groups>
                    <lineEnding>LF</lineEnding>
                    <removeUnused>true</removeUnused>
                    <staticAfter>true</staticAfter>
                </configuration>
                <executions>
                    <execution>
                        <id>sort-imports</id>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.16.0</version>
                <configuration>
                    <configFile>../eclipse-codeStyle.xml</configFile>
                    <lineEnding>LF</lineEnding>
                </configuration>
                <executions>
                    <execution>
                        <id>java-format</id>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.ec4j.maven</groupId>
                <artifactId>editorconfig-maven-plugin</artifactId>
                <version>0.1.1</version>
                <configuration>
                    <excludes>
                        <exclude>.bacon/</exclude>
                        <exclude>.cache/</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>editorconfig-format</id>
                        <goals>
                            <goal>format</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>@{project.version}${tagSuffix}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>release</releaseProfiles>
                    <stagingRepository>https://oss.sonatype.org/service/local/staging/deploy/maven2/</stagingRepository>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <phase>test</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
