<?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>com.theoryinpractise</groupId>
    <artifactId>googleformatter-maven-plugin</artifactId>
    <version>1.7.3</version>
    <packaging>maven-plugin</packaging>

    <name>googleformatter-maven-plugin Maven Mojo</name>
    <description>Apache Maven Mojo for reformatting code using the Google Code Formatter</description>
    <url>http://maven.apache.org</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>talios</id>
            <name>Mark Derricutt</name>
            <email>mark@talios.com</email>
            <url>http://www.talios.com</url>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.3</maven>
    </prerequisites>

    <scm>
        <connection>scm:git:git@github.com:talios/googleformatter-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:talios/googleformatter-maven-plugin.git</developerConnection>
        <url>https://github.com/talios/googleformatter-maven-plugin</url>
        <tag>googleformatter-maven-plugin-1.7.3</tag>
    </scm>
    <distributionManagement>
        <repository>
            <id>sonatype-staging</id>
            <name>oss.sonatype.org Staging Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-snapshots</id>
            <name>oss.sonatype.org Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.6.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-api</artifactId>
            <version>2.8.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-api</artifactId>
            <version>1.11.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-manager-plexus</artifactId>
            <version>1.11.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-providers-standard</artifactId>
            <version>1.11.2</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>27.1-jre</version>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>0.45</version>
        </dependency>
        <dependency>
            <groupId>com.google.googlejavaformat</groupId>
            <artifactId>google-java-format</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
            <version>2.3.3</version>
        </dependency>
        <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.27.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</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>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <!-- use error prone: http://errorprone.info/docs/installation -->
                <configuration>
                <compilerId>javac-with-errorprone</compilerId>
                <forceJavacCompilerUse>true</forceJavacCompilerUse>
                <compilerVersion>1.8</compilerVersion>
                <source>1.8</source>
                <target>1.8</target>
                <optimize>true</optimize>
                <useIncrementalCompilation>false</useIncrementalCompilation>
                <showWarnings>true</showWarnings>
                <annotationProcessorPaths>
                  <path>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava-beta-checker</artifactId>
                    <version>1.0</version>
                  </path>
                </annotationProcessorPaths>
                <compilerArgs>
                    <arg>-Xmaxerrs</arg>
                    <arg>1000000</arg>
                    <arg>-Xlint</arg>
                    <arg>-Xdiags:verbose</arg>
                    <arg>-XepExcludedPaths:.*/target/generated-.*sources/.*</arg>
                    <arg>-XepOpt:NullAway:AnnotatedPackages=com.theoryinpractise</arg>
                    <arg>-XepOpt:NullAway:ExcludedFieldAnnotations=org.apache.maven.plugins.annotations.Component,org.apache.maven.plugins.annotations.Parameter</arg>
                    <arg>-Xep:NullAway:ERROR</arg>
                    <arg>-Xep:OptionalEquality:WARN</arg>
                    <arg>-Xep:SelfComparison:ERROR</arg>
                    <arg>-Xep:SelfEquals:ERROR</arg>
                    <arg>-Xep:StringEquality:ERROR</arg>
                    <arg>-Xep:EqualsHashCode:ERROR</arg>
                    <arg>-Xep:EqualsIncompatibleType:ERROR</arg>
                    <arg>-Xep:NonOverridingEquals:ERROR</arg>
                    <arg>-Xep:NullableVoid:ERROR</arg>
                    <arg>-Xep:NullablePrimitive:ERROR</arg>
                    <arg>-Xep:NonOverridingEquals:ERROR</arg>
                    <arg>-Xep:NullableConstructor:ERROR</arg>
                    <arg>-Xep:MissingOverride:ERROR</arg>
                    <arg>-Xep:DateFormatConstant:ERROR</arg>
                    <arg>-Xep:StaticQualifiedUsingExpression:ERROR</arg>
                    <arg>-Xep:RedundantThrows:ERROR</arg>
                    <arg>-Xep:BetaApi:WARN</arg>
                </compilerArgs>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>7.1</version>
                        <!-- Use newer version of ASM -->
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-javac-errorprone</artifactId>
                        <version>2.8.5</version>
                    </dependency>
                    <!-- override plexus-compiler-javac-errorprone's dependency on
                        Error Prone with the latest version -->
                    <dependency>
                        <groupId>com.google.errorprone</groupId>
                        <artifactId>error_prone_core</artifactId>
                        <version>2.3.3</version>
                    </dependency>
                    <dependency>
                        <groupId>com.uber.nullaway</groupId>
                        <artifactId>nullaway</artifactId>
                        <version>0.7.3</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>googleformatter-maven-plugin</artifactId>
                <version>1.7.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <preparationGoals>clean tidy:pom com.theoryinpractise:googleformatter-maven-plugin:format install
                    </preparationGoals>
                    <goals>deploy</goals>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <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>
</project>
