<?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.site24x7</groupId>
    <artifactId>site24x7-log4j2-appender</artifactId>
    <version>1.3.0</version>
    <packaging>jar</packaging>

    <name>Site24x7 Log4j2 Appender</name>
    <description>Log4j2 appender that ships logs to Site24x7 with batching support</description>
    <url>https://www.site24x7.com</url>

    <licenses>
        <license>
            <name>Site24x7</name>
            <url>https://www.site24x7.com</url>
            <distribution>repo</distribution>
        </license>        
    </licenses>
    <developers>
        <developer>
            <id>applog</id>
            <name>Site24x7</name>
            <email>hosting@site24x7.com</email>
        </developer>
    </developers>
     <scm>
        <connection>https://repository.zoho.com/zohocorp/site24x7/site24x7-log4j2-appender.git</connection>
        <developerConnection>https://repository.zoho.com/zohocorp/site24x7/site24x7-log4j2-appender.git</developerConnection>
        <url>https://www.site24x7.com/</url>
    </scm>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
    <plugins>
        <!-- Compiler Plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
                <!-- Sources Plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <!-- Javadoc Plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.11.2</version>
            <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <!-- GPG Plugin - Signs artifacts -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</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>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>published</waitUntil>
                </configuration>
        </plugin>

<!--
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.6.0</version>
            <configuration>
                <minimizeJar>true</minimizeJar>
                    <filters>
                        <filter>
                            <artifact>org.jetbrains:annotations</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>org.jetbrains.kotlin:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>org.checkerframework:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>com.google.errorprone:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>com.google.j2objc:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>com.squareup.okio:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        <filter>
                            <artifact>org.slf4j:*</artifact>
                            <excludes>
                                <exclude>**</exclude>
                            </excludes>
                        </filter>
                        
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>LICENSE*</exclude>
                            </excludes>
                        </filter>
                    </filters>
            </configuration>
        </plugin>
-->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <annotationProcessorPaths>
                    <path>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-core</artifactId>
                        <version>2.24.3</version>
                    </path>
                </annotationProcessorPaths>
            </configuration>
        </plugin>
    </plugins>
</build>

    <dependencies>
        <!-- Log4j Core -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.24.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.24.3</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20240303</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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


</project>