<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>

  <prerequisites>
    <!-- The moment we define a managing super POM, we should use the maven-enforcer-plugin instead! -->
    <!-- See: http://stackoverflow.com/questions/10511501/can-and-should-a-maven-pom-specify-if-it-requires-maven-3-or-newer -->
    <maven>3.0.5</maven>
  </prerequisites>

  <groupId>de.ehex.foss</groupId>
  <artifactId>gematik-specifications</artifactId>
  <version>1.0.1</version>

  <name>eHealthExperts' FOOS gematik specifications</name>
  <description>This project provides the eHealthExperts-related, commonly used gematik specifications (AFOs, Specs, PTStBs, etc.).</description>
  <url>https://github.com/eHealthExperts/gematik-specifications</url>
  <inceptionYear>2016</inceptionYear>

  <organization>
    <name>eHealth Experts GmbH</name>
    <url>http://ehealthexperts.de</url>
  </organization>

  <developers>
    <developer>
      <name>Stefan Gasterstädt</name>
      <url>http://stefan.gasterstädt.de</url>
      <email>stefan@gasterstädt.de</email>
      <roles>
        <role>maintainer</role>
        <role>architect</role>
        <role>committer</role>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/eHealthExperts/gematik-specifications.git</connection>
    <developerConnection>scm:git:https://github.com/eHealthExperts/gematik-specifications.git</developerConnection>
    <url>https://github.com/eHealthExperts/gematik-specifications</url>
  </scm>

  <distributionManagement>
    <!-- For repository URLs see: https://issues.sonatype.org/browse/OSSRH-25435 -->
    <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>

  <properties>
    <!-- General Build Stuff Versions -->
    <version.java>1.8</version.java>
    <!-- http://maven.apache.org/general.html#encoding-warning -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <profiles>
    <profile>
      <!-- This profile is motivated by: http://stackoverflow.com/questions/14825039/suppressing-gpg-signing-for-maven-based-continous-integration-builds-travis-ci -->
      <!-- Activate by providing the "gpg.passphrase" property which must be provided anyway when doing signing. -->
      <id>ossrh</id>
      <activation>
        <property>
          <name>gpg.passphrase</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <!-- In order to disable artifact signing, run "mvn -Dgpg.skip ..." -->
            <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>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <Export-Package>de.ehex.foss.*</Export-Package>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <failOnError>true</failOnError>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>${version.java}</source>
          <target>${version.java}</target>
          <testSource>${version.java}</testSource>
          <testTarget>${version.java}</testTarget>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <encoding> ${project.build.sourceEncoding}</encoding>
          <docencoding>${project.reporting.outputEncoding}</docencoding>
          <failOnError>true</failOnError>
          <level>protected</level>
          <show>protected</show>
          <serialwarn>true</serialwarn>
          <validateLinks>true</validateLinks>
          <detectLinks>false</detectLinks>
          <!-- <detectLinks>true</detectLinks> -->
          <detectJavaApiLink>true</detectJavaApiLink>
          <!-- http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
          <additionalparam>-Xdoclint:none</additionalparam>
          <!-- http://blog.codefx.org/java/new-javadoc-tags/#apiNote-implSpec-and-implNote -->
          <!-- https://github.com/CodeFX-org/demo-javadoc-8-tags/blob/master/pom.xml?ts=4#L110-L133 -->
          <tags>
            <tag>
              <name>apiNote</name>
              <placement>a</placement>
              <head>API Note:</head>
            </tag>
            <tag>
              <name>implSpec</name>
              <placement>a</placement>
              <head>Implementation Requirements:</head>
            </tag>
            <tag>
              <name>implNote</name>
              <placement>a</placement>
              <head>Implementation Note:</head>
            </tag>
            <tag>
              <name>param</name>
            </tag>
            <tag>
              <name>return</name>
            </tag>
            <tag>
              <name>throws</name>
            </tag>
            <tag>
              <name>since</name>
            </tag>
            <tag>
              <name>version</name>
            </tag>
            <tag>
              <name>serialData</name>
            </tag>
            <tag>
              <name>see</name>
            </tag>
          </tags>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.0.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.5.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.j8unit</groupId>
      <artifactId>core</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>
