<?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>org.bahmni.module</groupId>
    <artifactId>bahmni-java-utils</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>Bahmni Java Utilities</name>
    <description>Various functional utilities needed by bahmni</description>
    <url>https://github.com/bahmni/bahmni-java-utils</url>
    <properties>
        <openmrs.version>2.4.2</openmrs.version>
        <slf4j.version>2.0.9</slf4j.version>
        <logback.version>1.3.0</logback.version>
    </properties>
    <modules>
        <module>bahmni-migrator</module>
        <module>web-clients</module>
        <module>mail-appender</module>
        <module>file-uploader</module>
        <module>visit-squasher</module>
        <module>font-transformer</module>
        <module>openmrs-connector</module>
        <module>common</module>
        <module>bahmni-extension</module>
        <module>form2-utils</module>
    </modules>

    <scm>
        <url>https://github.com/bahmni/bahmni-java-utils</url>
        <connection>scm:git:git@github.com:bahmni/bahmni-java-utils.git</connection>
        <developerConnection>scm:https://github.com/Bahmni/bahmni-java-utils.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>1</id>
            <name>bahmni</name>
            <email>infrastructure@bahmni.org</email>
            <organization>Bahmni.org</organization>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU AFFERO GENERAL PUBLIC LICENSE</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.txt</url>
        </license>
    </licenses>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <target>1.8</target>
                        <source>1.8</source>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.5.1</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>default-deploy</id>
                            <phase>deploy</phase>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <serverId>nexus-sonatype</serverId>
                        <nexusUrl>https://oss.sonatype.org</nexusUrl>
                        <skipStaging>true</skipStaging>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <extensions>
            <extension>
                <groupId>org.kuali.maven.wagons</groupId>
                <artifactId>maven-s3-wagon</artifactId>
                <version>1.2.1</version>
            </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>IT</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.17</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <argLine>-Xmx512m</argLine>
                                    <includes>
                                        <include>**/*IT.java</include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <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-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>openmrs-repo</id>
            <name>OpenMRS Nexus Repository</name>
            <url>https://mavenrepo.openmrs.org/nexus/content/repositories/public</url>
            <releases>
                <updatePolicy>always</updatePolicy>
            </releases>
        </repository>
        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <name>Repository for dependencies</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>interval:10080</updatePolicy>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype-nexus-releases</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>apache-maven-release</id>
            <name>Apache Maven Release Repository</name>
            <url>https://repository.apache.org/content/repositories/releases</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <name>Repository for plugins</name>
        </pluginRepository>
    </pluginRepositories>

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

</project>

