<?xml version="1.0"?>
<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.bazaarvoice.commons</groupId>
        <artifactId>bv-opensource-super-pom</artifactId>
        <version>1.12</version>
    </parent>

    <groupId>com.bazaarvoice.curator</groupId>
    <artifactId>curator-extensions</artifactId>
    <version>2.1.3</version>
    <packaging>pom</packaging>

    <scm>
        <url>https://github.com/bvengineering/curator-extensions</url>
        <connection>scm:git:git@github.com:bvengineering/curator-extensions</connection>
        <developerConnection>scm:git:git@github.com:bvengineering/curator-extensions</developerConnection>
        <tag>curator-extensions-2.1.3</tag>
    </scm>

    <name>curator-extensions</name>
    <description>Extensions and utilities for Apache Curator</description>

    <licenses>
        <license>
            <name>Copyright (c) 2025 Bazaarvoice, Inc.</name>
            <url>https://www.bazaarvoice.com/legal/api-terms-of-use.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>bvengineering</id>
            <name>Bazaarvoice Engineering</name>
            <email>open-source@bazaarvoice.com</email>
            <organization>Bazaarvoice, Inc.</organization>
            <organizationUrl>https://www.bazaarvoice.com</organizationUrl>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.3.9</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.minimum.version>1.8</java.minimum.version>
        <curator.version>4.2.0</curator.version>
        <guava.version>28.0-jre</guava.version>
        <slf4j.version>1.7.26</slf4j.version>
        <zookeeper.version>3.5.6</zookeeper.version>
        <logback.version>1.2.3</logback.version>
        <jackson.version>2.10.2</jackson.version>
        <dropwizard.version>1.3.17</dropwizard.version>
        <dependency.check.skip>true</dependency.check.skip>
    </properties>

    <build>
        <plugins>
            <!-- Make sure we always turn all warnings on during compilation. -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.minimum.version}</source>
                    <target>${java.minimum.version}</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <!-- Generate source JARs -->
            <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>
            <!-- Generate javadoc JARs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>8</source>
                    <detectJavaApiLink>false</detectJavaApiLink>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <!-- Release and deploy artifacts, bypassing the staging environment in the OSS Sonatype repository. -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>sonatype-central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots/</centralSnapshotsUrl>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>enforce</id>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <!-- See http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html for an explanation of version ranges-->
                                        <version>[${maven.minimum.version},)</version>
                                        <message>requires maven ${maven.minimum.version}</message>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <!-- See http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html for an explanation of version ranges-->
                                        <version>[${java.minimum.version},)</version>
                                        <message>requires Java ${java.minimum.version}</message>
                                    </requireJavaVersion>
                                    <dependencyConvergence />
                                    <requireUpperBoundDeps />
                                    <banDuplicatePomDependencyVersions />
                                    <bannedDependencies>
                                        <excludes>
                                            <!-- This should not exist after DW 0.8.x+ upgrade -->
                                            <!--                                        <exclude>com.codahale.metrics:*</exclude>-->
                                            <!-- This should not exist as it will force SLF4J calls to be delegated to log4j -->
                                            <exclude>org.slf4j:slf4j-log4j12</exclude>
                                            <!-- This should not exist as it will force SLF4J calls to be delegated to jul -->
                                            <exclude>org.slf4j:slf4j-jdk14</exclude>
                                            <!-- Ensure only the slf4j binding for logback is on the classpath -->
                                            <exclude>log4j:log4j</exclude>
                                        </excludes>
                                    </bannedDependencies>
                                </rules>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.2</version>
                    <executions>
                        <execution>
                            <id>analyze</id>
                            <goals>
                                <goal>analyze-only</goal>
                            </goals>
                            <configuration>
                                <failOnWarning>true</failOnWarning>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <skip>${dependency.check.skip}</skip>
                                <failBuildOnCVSS>6</failBuildOnCVSS>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-framework</artifactId>
                <version>${curator.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-recipes</artifactId>
                <version>${curator.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-client</artifactId>
                <version>${curator.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper</artifactId>
                <version>${zookeeper.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>log4j</artifactId>
                        <groupId>log4j</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper-jute</artifactId>
                <version>${zookeeper.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>log4j</artifactId>
                        <groupId>log4j</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>

            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-core</artifactId>
                <version>${dropwizard.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-lifecycle</artifactId>
                <version>${dropwizard.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-util</artifactId>
                <version>${dropwizard.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>5.4.3.Final</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>1.1.0.Final</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-healthchecks</artifactId>
                <version>4.0.5</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>3.2.4</version>
                <scope>test</scope>
            </dependency>

            <!-- curator-test >= 3 is incompatible with ZooKeeper < 3.5 -->
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-test</artifactId>
                <version>2.12.0</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>core</module>
        <module>dropwizard</module>
        <module>recipes</module>
        <module>test</module>
    </modules>
</project>
