<!--
  ~   Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  ~
  ~   Licensed under the Apache License, Version 2.0 (the "License").
  ~   You may not use this file except in compliance with the License.
  ~   A copy of the License is located at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~   or in the "license" file accompanying this file. This file 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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.amazonaws</groupId>
    <artifactId>amazon-neptune-sparql-java-sigv4</artifactId>
    <packaging>jar</packaging>
    <version>4.0.0</version>

    <name>amazon-neptune-sparql-java-sigv4</name>
    <description>
        A SPARQL client for Amazon Neptune that includes AWS Signature Version 4 signing.
        A NeptuneSparqlRepository for RDF4j and a AwsSigningHttpClient to use when creating a JENA repository connection.
    </description>
    <url>https://github.com/aws/amazon-neptune-sparql-java-sigv4</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://aws.amazon.com/apache2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>amazonwebservices</id>
            <organization>Amazon Web Services</organization>
            <organizationUrl>https://aws.amazon.com</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://aws.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://aws.oss.sonatype.org/content/groups/staging/</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:git@github.com:aws/amazon-neptune-sparql-java-sigv4.git</connection>
        <developerConnection>scm:git:git@github.com:aws/amazon-neptune-sparql-java-sigv4.git</developerConnection>
        <url>git@github.com:aws/amazon-neptune-sparql-java-sigv4.git</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <rdf4j.version>5.1.6</rdf4j.version>
        <jena.version>5.5.0</jena.version>
        <aws.sdk.version>2.34.5</aws.sdk.version>
        <junit.version>5.10.2</junit.version>
        <mockito.version>5.12.0</mockito.version>

        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
        <httpclient5.version>5.5.1</httpclient5.version>
        <slf4j-simple.version>2.0.16</slf4j-simple.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.18.2</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.18.2</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-cbor</artifactId>
                <version>2.18.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.eclipse.rdf4j</groupId>
            <artifactId>rdf4j-repository-sparql</artifactId>
            <version>${rdf4j.version}</version>
        </dependency>

        <!-- Apache Jena -->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>${jena.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-rdfconnection</artifactId>
            <version>${jena.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <version>${httpclient5.version}</version>
        </dependency>

        <!-- Neptune Sigv4 Signer -->
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>amazon-neptune-sigv4-signer</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- AWS SDK Dependencies -->
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>auth</artifactId>
            <version>${aws.sdk.version}</version>
        </dependency>

        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>http-auth-aws</artifactId>
            <version>${aws.sdk.version}</version>
        </dependency>

        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>regions</artifactId>
            <version>${aws.sdk.version}</version>
        </dependency>

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

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <!-- Package the source jar. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</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-compiler-plugin</artifactId>
                        <version>${maven-compiler-plugin.version}</version>
                        <configuration>
                            <source>${maven.compiler.source}</source>
                            <target>${maven.compiler.target}</target>
                        </configuration>
                    </plugin>

                    <!-- Package the javadoc jar. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <name>Amazon Neptune Sparql Java Sigv4</name>
                            <encoding>UTF-8</encoding>
                            <bottom>
                                <![CDATA[<center>Copyright &#169; 2018 Amazon.com. All Rights Reserved.</center>]]>
                            </bottom>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Sign the artifact -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Publish the artifacts. -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://aws.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

