<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>
    <artifactId>fhir-examples</artifactId>
    <groupId>com.ibm.fhir</groupId>
    <version>4.8.2</version>

    <name>IBM FHIR Server - Examples</name>
    <url>https://github.com/ibm/fhir</url>
    <organization>
        <name>IBM</name>
        <url>https://github.com/ibm/fhir</url>
    </organization>
    <scm>
        <url>https://github.com/ibm/fhir.git</url>
        <developerConnection>IBM</developerConnection>
        <tag>ibm-fhir-server</tag>
        <connection>scm:git:https://github.com/ibm/fhir.git</connection>
    </scm>
    <issueManagement>
        <url>https://github.com/ibm/fhir/issues</url>
    </issueManagement>
    <ciManagement>
        <url>https://github.com/ibm/fhir/actions</url>
    </ciManagement>
    <description>The IBM® FHIR® Server is a modular Java implementation of version 4 of the HL7 FHIR specification with a focus on performance and configurability.</description>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>IBM Watson Health Development</name>
            <email>fhirci@us.ibm.com</email>
            <url>https://www.ibm.com/</url>
            <organization>IBM Watson Health</organization>
            <organizationUrl>http://www.ibm.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <version>1.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>set-version-release</id>
            <!-- This profile changes the version -->
            <!-- mvn clean -Pversion.release=4.1.1 -f fhir-examples/pom.xml -->
            <properties>
                <version.release>4.0.0</version.release>
                <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <configuration>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>set</goal>
                                </goals>
                                <phase>clean</phase>
                                <configuration>
                                    <oldVersion>*</oldVersion>
                                    <newVersion>${version.release}</newVersion>
                                    <generateBackupPoms>true</generateBackupPoms>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>generate-javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <!-- speed up the build -->
                            <isOffline>true</isOffline>
                            <!-- no matter the JDK running the javadoc, it's 
                                important this be at the minimum level we support, which is 8. -->
                            <source>8</source>
                            <!-- we don't need package -->
                            <show>package</show>
                            <!-- verbose if you are debugging -->
                            <verbose>false</verbose>
                            <dependencySourceIncludes>com.ibm.fhir:*</dependencySourceIncludes>
                            <minmemory>2g</minmemory>
                            <maxmemory>2g</maxmemory>
                            <!-- doclint is none, otherwise build breaks -->
                            <doclint>none</doclint>
                            <additionalparam>-Xdoclint:none
                                -Djava.awt.headless=true</additionalparam>
                            <detectLinks>true</detectLinks>
                            <!-- control display -->
                            <author>false</author>
                            <windowtitle>IBM FHIR Server</windowtitle>
                            <doctitle>${project.name} ${project.version}</doctitle>
                            <additionalOptions>
                                <!-- makes the frames visible, disabled and 
                                    going away eventually -->
                                <additionalOption>--frames</additionalOption>
                                <!-- Fixes the undefined redirect in search -->
                                <additionalOption>--no-module-directories</additionalOption>
                            </additionalOptions>
                            <header><![CDATA[<a href="/FHIR" class="bx--header__name" target="_parent"><span>IBM</span>&nbsp;FHIR®&nbsp;Server</a>]]></header>
                            <bottom><![CDATA[Copyright 2019, 2021. <a href="http://www.ibm.com">IBM Corporation<a><br></br>FHIR&reg; is the registered trademark of HL7 and is used with the permission of HL7.]]></bottom>
                            <author>false</author>
                            <stylesheetfile>${project.build.directory}/../../fhir-parent/src/javadocs/stylesheet.css</stylesheetfile>
                            <!-- skips the three entries -->
                            <nohelp>true</nohelp>
                            <nodeprecated>true</nodeprecated>
                            <nodeprecatedlist>true</nodeprecatedlist>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>javadoc-no-fork</goal>
                                    <goal>test-javadoc-no-fork</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sign-artifact</id>
            <properties>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <defaultKeyring>false</defaultKeyring>
                            <gpgArguments>
                                <gpgArgument>--batch</gpgArgument>
                                <gpgArgument>--yes</gpgArgument>
                                <gpgArgument>--no-tty</gpgArgument>
                                <gpgArgument>--lock-never</gpgArgument>
                                <!-- important not to have spaces in the args -->
                                <gpgArgument>--pinentry-mode</gpgArgument>
                                <gpgArgument>loopback</gpgArgument>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>build-artifact</id>
            <properties>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <!-- Do not move this up to top level as it'll cause 
                            a conflict with m2e restrictions on v2.6 -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <archive>
                                <index>true</index>
                                <manifest>
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                </manifest>
                                <manifestEntries>
                                    <Build-Time>${maven.build.timestamp}</Build-Time>
                                    <Build-Number>${BUILD_ID}</Build-Number>
                                    <Git-Commit>${GIT_COMMIT}</Git-Commit>
                                    <Git-Branch>${GIT_BRANCH}</Git-Branch>
                                    <Git-URL>${GIT_URL}</Git-URL>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.8.1</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy-to-sonatype</id>
            <properties>
                <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <!-- plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-install-plugin</artifactId>
                        <version>3.0.0-M1</version>
                        <executions>
                            <execution>
                                <id>default-install</id>
                                <configuration>
                                    <skip>true</skip>
                                </configuration>
                            </execution>
                            <execution>
                                <id>default-test</id>
                                <configuration>
                                    <skip>true</skip>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <id>default-jar</id>
                                <configuration>
                                    <skip>true</skip>
                                </configuration>
                            </execution>
                            <execution>
                                <id>default-test</id>
                                <configuration>
                                    <skip>true</skip>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin-->
                </plugins>
            </build>

            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>fhir-javadocs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>3.8.2</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <version>2.9</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <configuration>
                            <!-- speed up the build -->
                            <isOffline>true</isOffline>
                            <!-- no matter the JDK running the javadoc, it's 
                                important this be at the minimum level we support, which is 8. -->
                            <source>8</source>
                            <!-- we don't need package -->
                            <show>package</show>
                            <!-- verbose if you are debugging -->
                            <verbose>false</verbose>
                            <dependencySourceIncludes>com.ibm.fhir:*</dependencySourceIncludes>
                            <minmemory>2g</minmemory>
                            <maxmemory>2g</maxmemory>
                            <!-- doclint is none, otherwise build breaks -->
                            <doclint>none</doclint>
                            <additionalparam>-Xdoclint:none -Djava.awt.headless=true</additionalparam>
                            <detectLinks>true</detectLinks>
                            <!-- control display -->
                            <author>false</author>
                            <windowtitle>IBM FHIR Server</windowtitle>
                            <doctitle>${project.name} ${project.version}</doctitle>
                            <additionalOptions>
                                <!-- makes the frames visible, disabled and going 
                                    away eventually -->
                                <additionalOption>--frames</additionalOption>
                                <!-- Fixes the undefined redirect in search -->
                                <additionalOption>--no-module-directories</additionalOption>
                            </additionalOptions>
                            <header><![CDATA[<a href="/FHIR" class="bx--header__name" target="_parent"><span>IBM</span>&nbsp;FHIR®&nbsp;Server</a>]]></header>
                            <bottom><![CDATA[Copyright 2019, 2021. <a href="http://www.ibm.com">IBM Corporation<a><br></br>FHIR&reg; is the registered trademark of HL7 and is used with the permission of HL7.]]></bottom>
                            <author>false</author>
                            <stylesheetfile>${project.build.directory}/../../fhir-parent/src/javadocs/stylesheet.css</stylesheetfile>
                            <!-- skips the three entries -->
                            <nohelp>true</nohelp>
                            <nodeprecated>true</nodeprecated>
                            <nodeprecatedlist>true</nodeprecatedlist>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>javadoc-no-fork</goal>
                                    <goal>test-javadoc-no-fork</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>