<?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.wizzdi</groupId>
    <artifactId>segmantix-parent</artifactId>
    <version>2.0.3</version>
    <packaging>pom</packaging>
    <name>Segmantix parent</name>
    <description>Segmantix Parent</description>
    <url>https://wizzdi.com</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>

    <modules>
      
        <module>segmantix-core</module>
        <module>segmantix-dependencies</module>
        <module>segmantix-jpa-store</module>
        <module>segmantix-jpa-spring</module>


    </modules>

    <properties>
        <revision>0.0.0-dev</revision> <!-- version is set during CI , 99.99.9 is a placeholder for local builds-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>



        <segmantix-jpa-spring.version>${project.version}</segmantix-jpa-spring.version>
        <segmantix-jpa-store.version>${project.version}</segmantix-jpa-store.version>
        <segmantix-core.version>${project.version}</segmantix-core.version>

        <commons-io.version>2.16.1</commons-io.version>


    

        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
        <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
        <maven-release-plugin.version>3.0.1</maven-release-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
       
        <maven-shade-plugin.version>3.5.3</maven-shade-plugin.version>
        <maven-core.version>3.9.6</maven-core.version>
        <maven-plugin-annotations.version>3.13.0</maven-plugin-annotations.version>

        <eclipselink.version>4.0.2</eclipselink.version>
        <maven-scm-api.version>2.1.0</maven-scm-api.version>
        <maven-scm-provider-gitexe.version>2.1.0</maven-scm-provider-gitexe.version>
        <maven-processor-plugin.version>5.1</maven-processor-plugin.version>
        <ci-friendly-flatten-maven-plugin.version>1.0.20</ci-friendly-flatten-maven-plugin.version>
        <testcontainers.version>1.19.8</testcontainers.version>
        <jakarta.persistence-api.version>3.1.0</jakarta.persistence-api.version>
        <slf4j-api.version>2.0.16</slf4j-api.version>
        <junit.version>4.13.2</junit.version>
        <junit-jupiter.version>5.10.3</junit-jupiter.version>

        <postgresql.version>42.7.4</postgresql.version>
        <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    </properties>
    <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>
    <developers>
        <developer>
            <id>asafbennatan</id>
            <name>Asaf Ben Natan</name>
            <email>asaf@wizzdi.com</email>
            <url>https://www.wizzdi.com</url>
            <organization>Wizzdi</organization>
            <organizationUrl>https://www.wizzdi.com</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>Israel</timezone>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:wizzdi/segmantix.git</connection>
        <developerConnection>scm:git:git@github.com:wizzdi/segmantix.git</developerConnection>
        <url>https://github.com/wizzdi/segmantix</url>
        <tag>segmantix-${project.version}</tag>
    </scm>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.wizzdi</groupId>
                <artifactId>segmantix-jpa-spring</artifactId>
                <version>${segmantix-jpa-spring.version}</version>
            </dependency>
            <dependency>
                <groupId>com.wizzdi</groupId>
                <artifactId>segmantix-jpa-store</artifactId>
                <version>${segmantix-jpa-store.version}</version>
            </dependency>
            <dependency>
                <groupId>com.wizzdi</groupId>
                <artifactId>segmantix-core</artifactId>
                <version>${segmantix-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>${jakarta.persistence-api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit-jupiter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.eclipse.persistence/eclipselink -->
            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>eclipselink</artifactId>
                <version>${eclipselink.version}</version>
                <scope>test</scope>
            </dependency>

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

            <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
                <scope>test</scope>
            </dependency>


            <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgresql.version}</version>
                <scope>test</scope>
            </dependency>


            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>postgresql</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.bsc.maven</groupId>
                    <artifactId>maven-processor-plugin</artifactId>
                    <version>${maven-processor-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven-plugin-annotations.version}</version>
                </plugin>
             
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-parameters</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging-maven-plugin.version}</version>

                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven-shade-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

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

            <plugin>
                <groupId>com.outbrain.swinfra</groupId>
                <artifactId>ci-friendly-flatten-maven-plugin</artifactId>
                <version>${ci-friendly-flatten-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <!-- Ensure proper cleanup. Will run on clean phase-->
                            <goal>clean</goal>
                            <!-- Enable ci-friendly version resolution. Will run on process-resources phase-->
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                </executions>


            </plugin>
            <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://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </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>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
            </plugin>

            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
            </plugin>

        </plugins>
        <resources>

            <resource>
                <directory>src/main/filtered</directory>
                <filtering>true</filtering>

            </resource>

            <resource>
                <directory>.</directory>
                <includes>
                    <include>pom.xml</include>
                </includes>

            </resource>

            <resource>
                <directory>src/main/resources</directory>

            </resource>

        </resources>
    </build>
    <profiles>
        <!-- GPG Signature on release -->
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>


</project>
