<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.0.6</version>
        <relativePath/>
    </parent>

    <groupId>dev.expopush</groupId>
    <artifactId>expo-push</artifactId>
    <version>1.0.0-RC1</version>
    <packaging>pom</packaging>
    
    <name>Expo Push Notification Spring Boot Starter</name>
    <description>A high-performance Spring Boot starter for sending push notifications via Expo.io with support for multiple backends (SQS, H2, Local).</description>
    <url>https://expopush.dev</url>

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

    <developers>
        <developer>
            <id>expopush</id>
            <name>Expo Push Team</name>
            <email>admin@expopush.dev</email>
            <organization>Expo Push</organization>
            <organizationUrl>https://expopush.dev</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/expopush/expo-push.git</connection>
        <developerConnection>scm:git:ssh://github.com:expopush/expo-push.git</developerConnection>
        <url>https://github.com/expopush/expo-push/tree/main</url>
    </scm>

    <modules>
        <module>expo-push-api</module>
        <module>expo-push-core</module>
        <module>expo-push-backend-api</module>
        <module>expo-push-backend-sqs</module>
        <module>expo-push-backend-local</module>
        <module>expo-push-backend-h2</module>
        <module>expo-push-spring-boot-starter</module>
    </modules>

    <properties>
        <java.version>21</java.version>
        <resilience4j.version>2.4.0</resilience4j.version>
        <aws-sdk.version>2.44.3</aws-sdk.version>
        <testcontainers.version>1.21.4</testcontainers.version>
        <swagger-annotations.version>2.2.49</swagger-annotations.version>
        <openapi-generator.version>7.22.0</openapi-generator.version>

        <sonar.organization>expopush</sonar.organization>
        <sonar.projectKey>expopush_expo-push</sonar.projectKey>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.coverage.jacoco.xmlReportPath>${project.build.directory}/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPath>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-backend-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-backend-sqs</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-backend-local</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>dev.expopush</groupId>
                <artifactId>expo-push-backend-h2</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2025.1.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.github.resilience4j</groupId>
                <artifactId>resilience4j-retry</artifactId>
                <version>${resilience4j.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.resilience4j</groupId>
                <artifactId>resilience4j-ratelimiter</artifactId>
                <version>${resilience4j.version}</version>
            </dependency>
            <dependency>
                <groupId>software.amazon.awssdk</groupId>
                <artifactId>bom</artifactId>
                <version>${aws-sdk.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>localstack</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>tools.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>3.1.3</version>
            </dependency>
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations-jakarta</artifactId>
                <version>${swagger-annotations.version}</version>
            </dependency>

            <!-- Fix vulnerable transitive dependencies -->
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>1.84</version>
            </dependency>
            <dependency>
                <groupId>commons-fileupload</groupId>
                <artifactId>commons-fileupload</artifactId>
                <version>1.6.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.28.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.openapitools</groupId>
                    <artifactId>openapi-generator-maven-plugin</artifactId>
                    <version>${openapi-generator.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.14</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>5.6.0.6792</version>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.10.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.4.0</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>3.12.0</version>
                        <configuration>
                            <doclint>none</doclint>
                            <failOnError>false</failOnError>
                        </configuration>
                        <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>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>local-sonar</id>
            <properties>
                <sonar.host.url>http://localhost:9000</sonar.host.url>
                <sonar.projectKey>expopush_expo-push</sonar.projectKey>
            </properties>
        </profile>
    </profiles>
</project>