<?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.aerospike</groupId>
    <artifactId>aerospike-expression-dsl</artifactId>
    <name>aerospike-expression-dsl</name>
    <description>Aerospike Expression DSL</description>
    <url>https://github.com/aerospike/expression-dsl-java</url>
    <packaging>jar</packaging>
    <version>0.2.0</version>

    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <skipTests>false</skipTests>
        <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
        <maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
        <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <aerospike-client-jdk8.version>9.2.0</aerospike-client-jdk8.version>
        <antlr.version>4.13.2</antlr.version>
        <lombok.version>1.18.42</lombok.version>
        <junit-jupiter.version>5.14.0</junit-jupiter.version>
        <assertj-core.version>3.27.6</assertj-core.version>
        <central.publishing.maven.plugin>0.8.0</central.publishing.maven.plugin>
    </properties>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <url>https://www.aerospike.com</url>
            <organization>Aerospike</organization>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/aerospike/expression-dsl-java</url>
        <connection>scm:git:git://github.com/aerospike/expression-dsl-java.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:aerospike/expression-dsl-java.git
        </developerConnection>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>com.aerospike</groupId>
            <artifactId>aerospike-client-jdk8</artifactId>
            <version>${aerospike-client-jdk8.version}</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${antlr.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj-core.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${antlr.version}</version>
                <executions>
                    <execution>
                        <id>antlr</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>src/main/antlr4/com/aerospike/dsl</sourceDirectory>
                            <outputDirectory>${project.build.directory}/generated-sources/antlr4/com/aerospike/dsl</outputDirectory>
                            <listener>false</listener>
                            <arguments>
                                <argument>-visitor</argument>
                                <argument>-no-listener</argument>
                            </arguments>
                            <includes>
                                <include>Condition.g4</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build-helper-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/antlr4/</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <skipTests>${skipTests}</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <doclint>all,-missing</doclint>
                    <reportOutputDirectory>${basedir}</reportOutputDirectory>
                    <doctitle>${project.name}</doctitle>
                    <show>public</show>
                    <splitindex>true</splitindex>
                    <bottom>Copyright © 2024-{currentYear} Aerospike, Inc. All rights reserved.</bottom>
                    <sourcepath>${project.basedir}/src/main/java;${project.basedir}/target/generated-sources/antlr4</sourcepath>
                    <source>17</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <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-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${central.publishing.maven.plugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
