<?xml version="1.0" encoding="UTF-8"?>

<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>

  <groupId>io.calendarium</groupId>
  <artifactId>calendarium-core</artifactId>
  <version>1.0.2</version>

  <name>calendarium-core</name>
  <url>http://github.com/crowdcode-de/calendarium</url>

  <description>This is a small utility library coping with events and recurring events including the generation
    of calendars containing the events.
  </description>

  <organization>
    <url>https://www.crowdcode.io</url>
    <name>Crowdcode GmbH + Co. KG</name>
  </organization>

  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
      <comments>Free to use. (C) 2021 Crowdcode GmbH+Co.KG</comments>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/crowdcode-de/calendarium-core</url>
    <connection>scm:git:https://github.com/crowdcode-de/calendarium-core.git</connection>
    <developerConnection>scm:svn:https://github.com/crowdcode-de/calendarium-core.git
    </developerConnection>
  </scm>

  <distributionManagement>
    <repository>
      <id>repo.crowdcode.io</id>
      <name>repo.crowdcode.io</name>
      <url>https://repo.crowdcode.io/repository/releases/</url>
    </repository>

    <snapshotRepository>
      <id>repo.crowdcode.io</id>
      <name>repo.crowdcode.io</name>
      <url>https://repo.crowdcode.io/repository/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <developers>
    <developer>
      <name>Marcus Noerder-Tuitje</name>
      <email>marcus.noerder-tuitje@crowdcode.io</email>
      <organization>Crowdcode GmbH+Co.Kg</organization>
      <url>https://crowdcode.io</url>
      <roles>
        <role>developer</role>
        <role>architect</role>
      </roles>
      <timezone>CET</timezone>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.7.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>

  <profiles>
    <profile>
      <id>windows</id>
      <properties>
        <platform.version>4.0.1.2</platform.version>
        <android.sdk.path>c:\entwicklung\jdk\android-sdk</android.sdk.path>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <docs.directory>C:/Temp/apidocs</docs.directory>
      </properties>
    </profile>
    <profile>
      <id>ci-system</id>
      <properties>
        <platform.version>4.0.1.2</platform.version>
        <android.sdk.path>/usr/java/android-sdk-linux</android.sdk.path>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <docs.directory>/var/www/baracus/apidocs</docs.directory>
      </properties>
    </profile>
    <profile>
      <id>mac</id>
      <properties>
        <platform.version>4.0.1.2</platform.version>
        <android.sdk.path>${user.home}/Library/Android/sdk</android.sdk.path>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>
    </profile>
    <profile>
      <id>sign-jar</id>
      <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>
                <configuration>
                  <executable>C:\Program Files\Git\usr\bin\gpg.exe</executable>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonatype</id>
      <distributionManagement>
        <!-- Publish versioned releases here -->
        <repository>
          <id>sonatype-staging</id>
          <name>Sonatype Release Staging Repository</name>
          <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>

        <!-- Publish snapshots here -->
        <snapshotRepository>
          <id>sonatype-snapshot</id>
          <name>Sonatype Snapshot Repository</name>
          <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>

      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
