<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/maven-v4_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>ethiohri.api</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>EthiOhriApi</name>
    <description>This module merely consist of end point which support the EthiOhri frontend and integration
    </description>

    <url>${nexus.url}/repository/maven-snapshots/</url>
    <organization>
        <name>ICAP At Columbia Unversity</name>
    </organization>
    <developers>
        <developer>
            <name>Abdi Asres</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:openmrs/openmrs-module-ethiohri.api.git</connection>
        <developerConnection>scm:git:git@github.com:openmrs/openmrs-module-ethiohri.api.git</developerConnection>
        <url>https://github.com/openmrs/openmrs-module-ethiohri.api/</url>
    </scm>

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

<!--    <distributionManagement>-->
<!--        <repository>-->
<!--            <id>nexus-releases</id>-->
<!--            <url>${nexus.url}/repository/maven-releases/</url>-->
<!--        </repository>-->
<!--        <snapshotRepository>-->
<!--            <id>nexus-snapshots</id>-->
<!--            <url>${nexus.url}/repository/maven-snapshots/</url>-->
<!--        </snapshotRepository>-->
<!--    </distributionManagement>-->


    <dependencies>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.34</version>
        </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.api</groupId>
            <artifactId>openmrs-api</artifactId>
            <version>${openmrsPlatformVersion}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.github.abdi-icap</groupId>
            <artifactId>aop-api</artifactId>
            <version>1.0.0</version>
            <type>jar</type>
        </dependency>
    </dependencies>
    <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>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <!--<repository>
            <id>nexus-snapshots</id>
            <name>Nexus Repository Switchboard</name>
            <layout>default</layout>
            <url>https://maven-repo.dh.moh.gov.et/repository/maven-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        -->
<!--        <repository>-->
<!--            <id>nexus-snapshots</id>-->
<!--            <name>MOH Solutions Nexus Snapshots</name>-->
<!--            <url>https://maven-repo.dh.moh.gov.et/repository/maven-snapshots</url>-->
<!--            <releases>-->
<!--                <enabled>false</enabled>-->
<!--            </releases>-->
<!--            <snapshots>-->
<!--                <enabled>true</enabled>-->
<!--                <updatePolicy>always</updatePolicy>-->
<!--            </snapshots>-->
<!--        </repository>-->
    </repositories>
    <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>
    <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>
                <!-- Spotless plugin -->
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>2.27.2</version>
                    <configuration>
                        <java>
                            <licenseHeader>
                                <file>${project.basedir}/license-header.txt</file>
                            </licenseHeader>
                            <eclipse>
                                <file>${project.basedir}/OpenMRSFormatter.xml</file>
                            </eclipse>
                            <removeUnusedImports/>
                            <importOrder>
                                <order>javax,java</order>
                            </importOrder>
                        </java>
                        <formats>
                            <format>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                                <licenseHeader>
                                    <file>${project.basedir}/license-header.txt</file>
                                    <delimiter>^(?!&lt;\?xml)</delimiter>
                                </licenseHeader>
                            </format>
                        </formats>
                    </configuration>
                    <executions>
                        <execution>
                            <id>spotless-apply</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>apply</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <properties>
        <openmrsPlatformVersion>2.2.1</openmrsPlatformVersion>
        <webservices.restVersion>2.45.0</webservices.restVersion>
        <aopVersion>1.0.0-SNAPSHOT</aopVersion>
        <nexus.url>https://maven-repo.dh.moh.gov.et</nexus.url>
    </properties>
</project>
