<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>de.bund.bva.isyfact</groupId>
  <artifactId>isy-checkstyle-config</artifactId>
  <version>0.1.0</version>
  <name>IsyFact Checkstyle Rules</name>
  <description>Provides a standard Checkstyle rule set to be used by IsyFact itself and projects that extend it.</description>
  <url>http://isyfact.de</url>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>IsyFact-Team</name>
      <email>isyfact@bva.bund.de</email>
      <organization>Bundesverwaltungsamt (BVA)</organization>
      <organizationUrl>https://www.bva.bund.de</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/IsyFact/isy-checkstyle-config.git</connection>
    <developerConnection>scm:git:ssh://github.com:IsyFact/isy-checkstyle-config.git</developerConnection>
    <url>https://github.com/IsyFact/isy-checkstyle-config</url>
  </scm>
  <properties>
    <revision>0.0.0-SNAPSHOT</revision>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tidy-maven-plugin</artifactId>
        <version>1.1.0</version>
        <executions>
          <execution>
            <id>check-pom-style</id>
            <phase>process-resources</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.2.7</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>Keine SNAPSHOT-Abhängigkeiten erlaubt!</message>
                    </requireReleaseDeps>
                    <requireReleaseVersion>
                      <message>Keine SNAPSHOT-Versionen erlaubt!</message>
                    </requireReleaseVersion>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>centralRelease</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.12</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>JARsigning</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-jarsigner-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
              <execution>
                <id>sign</id>
                <phase>deploy</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
              <execution>
                <id>verify</id>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <keystore>${sign.keystore}</keystore>
              <alias>${sign.alias}</alias>
              <storepass>${sign.storepass}</storepass>
              <tsa>http://timestamp.digicert.com</tsa>
              <arguments>
                <argument>${sign.proxyhost}</argument>
                <argument>${sign.proxyport}</argument>
              </arguments>
              <verbose>true</verbose>
              <certs>true</certs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>GPGsigning</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <keyname>${gpg.keyname}</keyname>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>centralmavenrepo</id>
      <activation>
        <property>
          <name>centraldeploy</name>
          <value>true</value>
        </property>
      </activation>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>internalmavenrepo</id>
      <activation>
        <property>
          <name>!centraldeploy</name>
        </property>
      </activation>
      <distributionManagement>
        <repository>
          <id>repository</id>
          <name>Repository</name>
          <url>${deploy-url-release}</url>
        </repository>
        <snapshotRepository>
          <id>repository</id>
          <name>Repository</name>
          <url>${deploy-url-snapshot}</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
