<?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>

    <parent>
        <groupId>org.openmrs.maven.parents</groupId>
        <artifactId>maven-parent-openmrs-module</artifactId>
        <version>1.1.1</version>
    </parent>

    <groupId>io.github.abdi-icap</groupId>
    <artifactId>mamba-core</artifactId>
    <version>2.0.2</version>
    <packaging>pom</packaging>
    <name>OpenMRS MambaETL Core: [parent]</name>
    <description>OpenMRS MambaETL Core - Extensible core functions for the OpenMRS MambaETL</description>

    <organization>
        <name>OpenMRS, UCSF, MakSPH</name>
    </organization>

    <url>https://wiki.openmrs.org/x/FQ4z</url>

    <licenses>
        <license>
            <name>Mozilla Public License 2.0 with Health Care Disclaimer</name>
            <url>https://github.com/CDC-HIS/openmrs-module-mamba-core/blob/main/LICENSE.md</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:CDC-HIS/openmrs-module-mamba-core.git</connection>
        <url>https://github.com/CDC-HIS/openmrs-module-mamba-core</url>
        <developerConnection>scm:git:git@github.com:CDC-HIS/openmrs-module-mamba-core.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>api</module>
    </modules>

    <dependencyManagement>

        <dependencies>

            <dependency>
                <groupId>org.openmrs.api</groupId>
                <artifactId>openmrs-api</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.web</groupId>
                <artifactId>openmrs-web</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.api</groupId>
                <artifactId>openmrs-api</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.web</groupId>
                <artifactId>openmrs-web</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.test</groupId>
                <artifactId>openmrs-test</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <type>pom</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>webservices.rest-omod-common</artifactId>
                <version>${webservicesRestVersion}</version>
                <type>jar</type>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>webservices.rest-omod-common</artifactId>
                <version>${webservicesRestVersion}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>webservices.rest-omod-2.0</artifactId>
                <version>${webservicesRestVersion}</version>
                <type>jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jacksonCoreVersion}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-dbcp2</artifactId>
                <version>${apache.commons.dbcp}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jakarta.transaction</groupId>
                        <artifactId>jakarta.transaction-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

        </dependencies>

    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.openmrs.api</groupId>
            <artifactId>openmrs-api</artifactId>
            <type>test-jar</type>
            <version>${openmrsPlatformVersion}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-module-junit4</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openmrs.api</groupId>
            <artifactId>openmrs-api</artifactId>
            <version>${openmrsPlatformVersion}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-module-junit4</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openmrs.test</groupId>
            <artifactId>openmrs-test</artifactId>
            <type>pom</type>
            <version>${openmrsPlatformVersion}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-module-junit4</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.powermock</groupId>
                    <artifactId>powermock-api-mockito2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <pluginRepositories>

        <pluginRepository>
            <id>openmrs-repo</id>
            <name>OpenMRS Nexus Repository</name>
            <url>https://mavenrepo.openmrs.org/public</url>

            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>

    </pluginRepositories>

    <properties>
        <version.java>21</version.java>
        <maven.compiler.release>${version.java}</maven.compiler.release>
        <maven.release.plugin>3.0.0-M6</maven.release.plugin>
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
        <version.maven-surefire-plugin>3.2.5</version.maven-surefire-plugin>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit5Version>5.7.2</junit5Version>
        <junit4Version>4.13.1</junit4Version>
        <openmrsPlatformVersion>2.0.0</openmrsPlatformVersion>
        <webservicesRestVersion>2.21.0</webservicesRestVersion>
        <apache.commons.dbcp>2.11.0</apache.commons.dbcp>
        <jacksonCoreVersion>2.15.3</jacksonCoreVersion>

    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <bestPractices>true</bestPractices>
                </configuration>
            </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-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.6.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.plugin}</version>
                    <configuration>
                        <!--
                        <preparationGoals>clean install</preparationGoals>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>-Prelease</arguments>
                        -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven-surefire-plugin}</version>
                    <executions>
                        <execution>
                            <phase>test</phase>
                            <id>default-test</id>
                            <configuration>
                                <excludes>
                                    <exclude>**/it/**</exclude>
                                </excludes>
                                <reportsDirectory>${project.build.directory}/test-reports/unit</reportsDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <release>${maven.compiler.release}</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.11</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>

        <repository>
            <id>openmrs-repo</id>
            <name>OpenMRS Nexus Repository</name>
            <url>https://mavenrepo.openmrs.org/public</url>
        </repository>

        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <layout>default</layout>
            <url>https://repo1.maven.org/maven2</url>
        </repository>

    </repositories>

    <!-- Publishing moved to Maven Central via the Central Portal (see the "release" profile below).
         mavenrepo.openmrs.org will not accept this groupId, so the old OpenMRS distribution
         repositories no longer apply here.
    <distributionManagement>
        <repository>
            <id>openmrs-repo-modules</id>
            <name>OpenMRS Modules</name>
            <url>https://mavenrepo.openmrs.org/modules</url>
        </repository>
        <snapshotRepository>
            <id>openmrs-repo-snapshots</id>
            <name>OpenMRS Snapshots</name>
            <url>https://mavenrepo.openmrs.org/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    -->

<!--    <profiles>-->
<!--        <profile>-->
<!--            <id>release</id>-->
<!--            <build>-->
<!--                <plugins>-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-gpg-plugin</artifactId>-->
<!--                        <version>3.2.4</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>sign-artifacts</id>-->
<!--                                <phase>verify</phase>-->
<!--                                <goals>-->
<!--                                    <goal>sign</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                        <configuration>-->
<!--                            <bestPractices>true</bestPractices>-->
<!--                        </configuration>-->
<!--                    </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-no-fork</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-javadoc-plugin</artifactId>-->
<!--                        <version>3.6.3</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>attach-javadocs</id>-->
<!--                                <goals>-->
<!--                                    <goal>jar</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                        <configuration>-->
<!--                            <failOnError>false</failOnError>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
<!--                    <plugin>-->
<!--                        <groupId>org.sonatype.central</groupId>-->
<!--                        <artifactId>central-publishing-maven-plugin</artifactId>-->
<!--                        <version>0.6.0</version>-->
<!--                        <extensions>true</extensions>-->
<!--                        <configuration>-->
<!--                            <publishingServerId>central</publishingServerId>-->
<!--                            <autoPublish>false</autoPublish>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
<!--                </plugins>-->
<!--            </build>-->
<!--        </profile>-->
<!--    </profiles>-->

    <developers>
        <developer>
            <id>OpenMRS-MambaETL-MakSPH</id>
            <name>Arthur D. Mugume</name>
            <organization>MakSPH</organization>
            <organizationUrl>https://mets.or.ug</organizationUrl>
        </developer>
        <developer>
            <id>OpenMRS-MambaETL-UCSF</id>
            <name>Laureen G. Omare</name>
            <organization>UCSF</organization>
            <organizationUrl>http://ucglobalprograms.org/kenya</organizationUrl>
        </developer>
        <developer>
            <id>OpenMRS-MambaETL-UoN</id>
            <name>Amos Laboso</name>
            <organization>UoN</organization>
            <organizationUrl>https://www.uonbi.ac.ke</organizationUrl>
        </developer>
    </developers>

</project>
