<?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>

    <groupId>com.instaclustr</groupId>
    <artifactId>cassandra-driver-kerberos</artifactId>
    <version>3.0.0</version>
    <packaging>jar</packaging>

    <name>Cassandra Kerberos Authenticator</name>
    <description>
        A plugin for the Apache Cassandra Java driver that provides the ability to authenticate via GSS-API
    </description>

    <url>https://github.com/instaclustr/cassandra-java-driver-kerberos</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Various</name>
            <organization>Instaclustr</organization>
            <organizationUrl>https://www.instaclustr.com</organizationUrl>
        </developer>
    </developers>
    
    <organization>
        <name>Instaclustr</name>
        <url>https://instaclustr.com</url>
    </organization>
    
    <scm>
        <connection>scm:git:git@github.com:instaclustr/cassandra-java-driver-kerberos.git</connection>
        <developerConnection>scm:git:git@github.com:instaclustr/cassandra-java-driver-kerberos.git</developerConnection>
        <url>https://github.com/instaclustr/cassandra-java-driver-kerberos</url>
    </scm>

    <properties>
        <java-driver.version>4.9.0</java-driver.version>

        <version.maven.compiler.plugin>3.8.0</version.maven.compiler.plugin>
        <version.maven.source.plugin>3.0.1</version.maven.source.plugin>
        <version.maven.javadoc.plugin>3.1.0</version.maven.javadoc.plugin>
        <version.maven.gpg.plugin>1.6</version.maven.gpg.plugin>
        <maven.jar.plugin.version>3.1.1</maven.jar.plugin.version>
        <version.nexus.staging.maven.plugin>1.6.8</version.nexus.staging.maven.plugin>
    
        <outputDirectory>${project.build.directory}</outputDirectory>
        
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.datastax.oss</groupId>
            <artifactId>java-driver-core</artifactId>
            <version>${java-driver.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>cassandra-driver-kerberos</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven.compiler.plugin}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <outputDirectory>${outputDirectory}</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <!--Use this profile when releasing. For example: "mvn clean deploy -P release"-->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.maven.source.plugin}</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-javadoc-plugin</artifactId>
                        <version>${version.maven.javadoc.plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven.gpg.plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${version.nexus.staging.maven.plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <!--Use "mvn nexus-staging:release -P release" to push from the OSSRH staging repo to Maven Central-->
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
