<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.openehealth.ipf.gazelle</groupId>
    <artifactId>ipf-gazelle-validation</artifactId>
    <version>1.0.8</version>
    <name>ipf-gazelle-validation</name>
    <packaging>pom</packaging>

    <properties>
        <!-- Default Bundle Properties -->
        <osgi.export.pkg>*</osgi.export.pkg>
        <osgi.import.pkg>org.slf4j.*;version="[1.6,2)",*</osgi.import.pkg>
        <osgi.dynamic.import.pkg />
        <osgi.private.pkg />
        <osgi.bundle.activator />
        <osgi.bundle.classpath />
        <osgi.embed.dependency />
        <osgi.fragment.host />
        <osgi.require.bundle />
        <osgi.spring.context />
        <ipf.extension.classes />
        <ipf.extension.beans />
        <eclipse.supplement.bundle />
        <osgi.bundle.vendor>Open eHealth Foundation</osgi.bundle.vendor>
        <osgi.bundle.license>Apache License, Version 2.0;url=http://www.apache.org/licenses/LICENSE-2.0;description=OpenSource license provided by the Apache foundation</osgi.bundle.license>
        <osgi.bundle.category>healthcare</osgi.bundle.category>

        <assembly-plugin-version>2.4</assembly-plugin-version>
        <bundle-plugin-version>2.0.1</bundle-plugin-version>
        <compiler-plugin-version>3.2</compiler-plugin-version>
        <download-plugin-version>1.2.0</download-plugin-version>
        <gpg-plugin-version>1.5</gpg-plugin-version>
        <jar-plugin-version>2.4</jar-plugin-version>
        <javadocs-plugin-version>2.9.1</javadocs-plugin-version>
        <nexus-staging-plugin-version>1.6.3</nexus-staging-plugin-version>
        <sources-plugin-version>2.2.1</sources-plugin-version>

        <!-- You can set this to true e.g. in CI builds to force downloading the files from the source
             instead of accessing them from the cache -->
        <skipCache>false</skipCache>

        <commons-collections-version>3.2.1</commons-collections-version>
        <commons-io-version>2.4</commons-io-version>
        <easymock-version>3.3.1</easymock-version>
        <hapi-version>2.2</hapi-version>
        <slf4j-version>1.7.7</slf4j-version>
        <junit-version>4.11</junit-version>
    </properties>

    <url>https://github.com/oehf/ipf-gazelle</url>

    <description>IPF-Gazelle is a project containing all available Gazelle HL7v2 validation profiles</description>

    <organization>
        <name>Open eHealth Foundation</name>
        <url>http://www.openehealth.org/</url>
    </organization>

    <developers>
        <developer>
            <id>ohr</id>
            <name>Christian Ohr</name>
            <email>christian.ohr@icw.de</email>
            <organization>InterComponentWare AG</organization>
            <organizationUrl>http://www.icw-global.com/</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>rnd</id>
            <name>Dmytro Rud</name>
            <email>dmytro.rud@gmail.com</email>
            <organization>InterComponentWare AG</organization>
            <organizationUrl>http://www.icw-global.com/</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>boris</id>
            <name>Boris Stanojevic</name>
            <email>stanojevic.boris@gmail.com</email>
            <organization>InterComponentWare AG</organization>
            <organizationUrl>http://www.icw-global.com/</organizationUrl>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <issueManagement>
        <system>Github Issue Tracker</system>
        <url>https://github.com/oehf/ipf-gazelle/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <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>
        <site>
            <id>openehealth.site</id>
            <url>file:/data/sites/ipf-gazelle/reports/ipf-gazelle-${project.version}</url>
        </site>
    </distributionManagement>

    <scm>
        <connection>scm:git:git@github.com:oehf/ipf-gazelle.git</connection>
        <developerConnection>scm:git:git@github.com:oehf/ipf-gazelle.git</developerConnection>
        <url>scm:git:git@github.com:oehf/ipf-gazelle.git</url>
    </scm>

    <modules>
        <module>commons</module>
        <module>profiles</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-base</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-structures-v231</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-structures-v24</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-structures-v25</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-structures-v251</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi</groupId>
                <artifactId>hapi-structures-v26</artifactId>
                <version>${hapi-version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io-version}</version>
            </dependency>
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>${commons-collections-version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j-version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit-version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>${easymock-version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${assembly-plugin-version}</version>
                </plugin>
                <plugin>
                    <groupId>com.googlecode.maven-download-plugin</groupId>
                    <artifactId>download-maven-plugin</artifactId>
                    <version>${download-plugin-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${jar-plugin-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler-plugin-version}</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                        <fork>true</fork>
                        <verbose>false</verbose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${sources-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${bundle-plugin-version}</version>  <configuration>
                    <excludeDependencies>*;scope=provided|runtime</excludeDependencies>
                </configuration>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <unpackBundle>true</unpackBundle>
                    <manifestLocation>META-INF</manifestLocation>
                    <instructions>
                        <!-- remove the qualifier from ANY versioning rule -->
                        <_versionpolicy>"$(version;===;$(@))"</_versionpolicy>

                        <!-- This doesn't work with the 2.0.1 version of the plug-in, but probably later-->
                        <!--_versionpolicy-impl>[$(version;==;$(@)),$(version;=+;$(@)))</_versionpolicy-impl-->
                        <!--_versionpolicy-uses>[$(version;=;$(@)),$(version;+;$(@)))</_versionpolicy-uses-->
                        <!-- enable simple spring xml file analysis -->
                        <_plugin>aQute.lib.spring.SpringComponent</_plugin>
                        <!-- Changed behavior in the > 2.0.0 bundle version forces us to do it this way -->
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                        <Export-Package>${osgi.export.pkg}</Export-Package>
                        <Import-Package>${osgi.import.pkg}</Import-Package>
                        <DynamicImport-Package>${osgi.dynamic.import.pkg}</DynamicImport-Package>
                        <Private-Package>${osgi.private.pkg}</Private-Package>
                        <Bundle-Activator>${osgi.bundle.activator}</Bundle-Activator>
                        <Bundle-ClassPath>${osgi.bundle.classpath}</Bundle-ClassPath>
                        <Embed-Dependency>${osgi.embed.dependency}</Embed-Dependency>
                        <Fragment-Host>${osgi.fragment.host}</Fragment-Host>
                        <Require-Bundle>${osgi.require.bundle}</Require-Bundle>
                        <Bundle-Category>${osgi.bundle.category}</Bundle-Category>

                        <!-- project specifics -->
                        <Bundle-Description>${project.description}</Bundle-Description>
                        <Bundle-Vendor>${osgi.bundle.vendor}</Bundle-Vendor>
                        <Bundle-License>${osgi.bundle.license}</Bundle-License>

                        <!-- custom headers (not according to OSGi-Spec standard) -->
                        <Spring-Context>${osgi.spring.context}</Spring-Context>
                        <Extension-Classes>${ipf.extension.classes}</Extension-Classes>
                        <Extension-Beans>${ipf.extension.beans}</Extension-Beans>
                        <Eclipse-SupplementBundle>${eclipse.supplement.bundle}</Eclipse-SupplementBundle>

                        <Build-Time>$(now)</Build-Time>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>bundle-install</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>bundle-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-plugin-version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${javadocs-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${gpg-plugin-version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
