<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://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>com.github.shyiko.ktlint</groupId>
  <artifactId>pom</artifactId>
  <version>0.34.2</version>
  <packaging>pom</packaging>
  <name>pom</name>
  <description>An anti-bikeshedding Kotlin linter with built-in formatter</description>
  <url>https://github.com/pinterest/ktlint</url>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>pinterest</id>
      <name>Pinterest, Inc.</name>
    </developer>
    <developer>
      <id>shyiko</id>
      <name>Stanley Shyiko</name>
      <email>stanley.shyiko@gmail.com</email>
    </developer>
  </developers>
  <modules>
    <module>ktlint</module>
    <module>ktlint-core</module>
    <module>ktlint-reporter-checkstyle</module>
    <module>ktlint-reporter-json</module>
    <module>ktlint-reporter-plain</module>
    <module>ktlint-ruleset-experimental</module>
    <module>ktlint-ruleset-standard</module>
    <module>ktlint-test</module>
  </modules>
  <scm>
    <connection>scm:git:git@github.com:pinterest/ktlint.git</connection>
    <developerConnection>scm:git:git@github.com:pinterest/ktlint.git</developerConnection>
    <url>git@github.com:pinterest/ktlint.git</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>maven-central</id>
      <name>Sonatype Nexus Staging</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>maven-central</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <github.description>${project.version}</github.description>
    <jimfs.version>1.1</jimfs.version>
    <kotlin.compiler.languageVersion>1.3</kotlin.compiler.languageVersion>
    <aether.version>1.1.0</aether.version>
    <junit.version>4.12</junit.version>
    <klob.version>0.2.1</klob.version>
    <kotlin.version>1.3.41</kotlin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <kotlin.compiler.apiVersion>1.3</kotlin.compiler.apiVersion>
    <assertj.version>3.12.2</assertj.version>
    <gpg.skip>false</gpg.skip>
    <aether.maven.provider.version>3.3.9</aether.maven.provider.version>
    <picocli.version>3.9.6</picocli.version>
  </properties>
  <build>
    <extensions>
      <extension>
        <groupId>com.github.shyiko.servers-maven-extension</groupId>
        <artifactId>servers-maven-extension</artifactId>
        <version>1.3.1</version>
      </extension>
      <extension>
        <groupId>com.github.shyiko.usage-maven-plugin</groupId>
        <artifactId>usage-maven-plugin</artifactId>
        <version>1.0.0</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <version>${kotlin.version}</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>process-sources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>test-compile</id>
            <phase>process-test-sources</phase>
            <goals>
              <goal>test-compile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <jvmTarget>1.8</jvmTarget>
          <args>
            <arg>-Xskip-runtime-version-check</arg>
          </args>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Implementation-Version>${project.version}</Implementation-Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M1</version>
        <executions>
          <execution>
            <id>enforce</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <dependencyConvergence />
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.shyiko.usage-maven-plugin</groupId>
        <artifactId>usage-maven-plugin</artifactId>
        <version>1.0.0</version>
        <configuration>
          <usage># build "./ktlint/target/ktlint" (executable jar)
                        ./mvnw -Pcapsule clean package -Dmaven.test.skip=true

                        # test (&amp; check code style)
                        ./mvnw clean verify

                        # run
                        ./mvnw -pl ktlint compile exec:java -Dexec.args="--help"

                        # publish a new version
                        ./mvnw versions:set -DnewVersion=&lt;version>
                        ./mvnw -Ddeploy=maven-central
                        ./mvnw -Ddeploy=github
                        ./mvnw -Ddeploy=github-release-notes -N
                        ./mvnw -Ddeploy=refs -N</usage>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>deploy-to-maven-central</id>
      <activation>
        <property>
          <name>deploy</name>
          <value>maven-central</value>
        </property>
      </activation>
      <build>
        <defaultGoal>clean deploy</defaultGoal>
        <plugins>
          <plugin>
            <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>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <serverId>maven-central</serverId>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>deploy-to-github</id>
      <activation>
        <property>
          <name>deploy</name>
          <value>github</value>
        </property>
      </activation>
      <build>
        <defaultGoal>clean deploy</defaultGoal>
      </build>
    </profile>
    <profile>
      <id>update-github-release-notes</id>
      <activation>
        <property>
          <name>deploy</name>
          <value>github-release-notes</value>
        </property>
      </activation>
      <build>
        <defaultGoal>antrun:run</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.8</version>
            <configuration>
              <target name="update-github-release-notes">
                <exec failonerror="true" dir="${basedir}" executable="chandler">
                  <arg value="push" />
                  <arg value="${project.version}" />
                  <env value="${settings.servers.github.privateKey}" key="CHANDLER_GITHUB_API_TOKEN" />
                </exec>
              </target>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>announce</id>
      <activation>
        <property>
          <name>deploy</name>
          <value>refs</value>
        </property>
      </activation>
      <build>
        <defaultGoal>exec:exec@announce</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <executions>
              <execution>
                <id>announce</id>
                <configuration>
                  <executable>${project.basedir}/.announce</executable>
                  <environmentVariables>
                    <VERSION>${project.version}</VERSION>
                    <GITHUB_TOKEN>${settings.servers.github.privateKey}</GITHUB_TOKEN>
                  </environmentVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
