<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.bahmni.module</groupId>
        <artifactId>fhir-cdss-int</artifactId>
        <version>2.0.0</version>
    </parent>

    <artifactId>fhir-cdss-int-omod</artifactId>
    <packaging>jar</packaging>
    <name>FHIR CDSS integration OMOD</name>
    <description>OpenMRS module for Fhir CDSS Integration</description>
    <dependencies>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-api</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openmrs.web</groupId>
            <artifactId>openmrs-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openmrs.module</groupId>
            <artifactId>fhir2-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openmrs.module</groupId>
            <artifactId>webservices.rest-omod-common</artifactId>
        </dependency>

        <!--        Test Dependencies       -->
        <dependency>
            <groupId>org.openmrs.web</groupId>
            <artifactId>openmrs-web</artifactId>
            <version>${openmrsPlatformVersion}</version>
            <scope>provided</scope>
            <classifier>tests</classifier>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockitoVersion}</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.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.parent.artifactId}-${project.parent.version}</finalName>

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

        <plugins>
            <plugin>
                <groupId>org.openmrs.maven.plugins</groupId>
                <artifactId>maven-openmrs-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>init</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>initialize-module</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>pack</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package-module</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>Expand moduleApplicationContext and messages</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <includeGroupIds>${project.parent.groupId}</includeGroupIds>
                            <includeArtifactIds>${project.parent.artifactId}-api</includeArtifactIds>
                            <excludeTransitive>true</excludeTransitive>
                            <includes>**/*</includes>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>