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

    <groupId>org.bahmni.module</groupId>
    <artifactId>fhir-ts-services-int</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>
    <name>Fhir Terminology Services</name>
    <description>OpenMRS Module to integrate Fhir Terminology Services with Bahmni</description>
    <url>https://demo.mybahmni.org/bahmni/home/index.html</url>

    <licenses>
        <license>
            <name>Mozilla Public License Version 2.0</name>
            <url>https://www.bahmni.org/license/mplv2hd</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Bahmni</name>
            <email>bahmnicommunity@gmail.com</email>
            <organization>Bahmni</organization>
            <organizationUrl>https://github.com/Bahmni</organizationUrl>
        </developer>
    </developers>
    <properties>
        <openmrsPlatformVersion>2.6.15</openmrsPlatformVersion>
        <springVersion>5.3.23</springVersion>
        <powerMockVersion>2.0.9</powerMockVersion>
        <mockitoVersion>3.5.11</mockitoVersion>
        <junitVersion>4.13.1</junitVersion>
        <webServicesVersion>2.50.0</webServicesVersion>
        <jacocoVersion>0.8.3</jacocoVersion>
        <openmrsFhir2Version>3.0.0</openmrsFhir2Version>
        <commonsLang3Version>3.12.0</commonsLang3Version>
        <jenaArqVersion>4.7.0</jenaArqVersion>
        <emrapiVersion>2.4.0</emrapiVersion>
        <metadatamappingVersion>2.0.0</metadatamappingVersion>
        <bahmniCoreVersion>2.1.0</bahmniCoreVersion>
    </properties>
    <scm>
        <connection>scm:git:git://github.com/bahmni/openmrs-module-snomed.git</connection>
        <developerConnection>scm:git:https://github.com/Bahmni/openmrs-module-snomed.git</developerConnection>
        <url>https://github.com/Bahmni/openmrs-module-snomed</url>
    </scm>
    <modules>
        <module>api</module>
        <module>omod</module>
    </modules>

    <build>
        <resources>
		<resource>
			<directory>src/main/resources</directory>
			<filtering>true</filtering>
			<includes>
				<include>**/*.xml</include>
				<include>**/*.txt</include>
				<include>**/*.properties</include>
			</includes>
		</resource>
		<resource>
			<directory>src/main/resources</directory>
			<filtering>false</filtering>
			<excludes>
				<exclude>**/*.xml</exclude>
				<exclude>**/*.txt</exclude>
				<exclude>**/*.properties</exclude>
			</excludes>
		</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.txt</include>
					<include>**/*.properties</include>
				</includes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/*.xml</exclude>
					<exclude>**/*.txt</exclude>
					<exclude>**/*.properties</exclude>
				</excludes>
			</testResource>
		</testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <target>1.8</target>
                        <source>1.8</source>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.openmrs.maven.plugins</groupId>
                    <artifactId>maven-openmrs-plugin</artifactId>
                    <version>1.0.1</version>
                </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.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.10</version>
                    <configuration>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/BaseIntegrationTest.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>nexus-sonatype</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </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>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>interval:10080</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>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openmrs.api</groupId>
                <artifactId>openmrs-api</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <type>jar</type>
                <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.module</groupId>
                <artifactId>webservices.rest-omod-common</artifactId>
                <version>${webServicesVersion}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>fhir2-api</artifactId>
                <version>${openmrsFhir2Version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>fhir2-omod</artifactId>
                <version>${openmrsFhir2Version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>metadatamapping-api</artifactId>
                <version>${metadatamappingVersion}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.bahmni.module</groupId>
                <artifactId>bahmnicore-omod</artifactId>
                <version>${bahmniCoreVersion}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.bahmni.module</groupId>
                <artifactId>bahmni-emr-api</artifactId>
                <type>jar</type>
                <version>${bahmniCoreVersion}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.openmrs.module</groupId>
                <artifactId>emrapi-api</artifactId>
                <version>${emrapiVersion}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-library</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commonsLang3Version}</version>
                <scope>provided</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.web</groupId>
                <artifactId>openmrs-web</artifactId>
                <version>${openmrsPlatformVersion}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.jena</groupId>
                <artifactId>jena-arq</artifactId>
                <version>${jenaArqVersion}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powerMockVersion}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito2</artifactId>
                <version>${powerMockVersion}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junitVersion}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockitoVersion}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <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>
                        <configuration>
						<!-- Prevent gpg from using pinentry programs -->
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
