<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.tashoyan</groupId>
    <artifactId>scalariform-maven-plugin</artifactId>
    <version>0.2.3</version>
    <packaging>maven-plugin</packaging>
    <name>Maven Scalariform Plugin</name>
    <description>Maven plugin to run Scalariform, a Scala code formatter</description>

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

        <compiler.java.version>1.8</compiler.java.version>
        <compiler.scala.version>2.13.0</compiler.scala.version>
        <compiler.scala.compat.version>2.13</compiler.scala.compat.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <scala-maven-plugin.version>4.1.1</scala-maven-plugin.version>
        <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
        <maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>

        <scalariform.version>0.2.10</scalariform.version>
        <maven-pligin-api.version>3.6.1</maven-pligin-api.version>
        <maven-plugin-annotations.version>3.6.0</maven-plugin-annotations.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala-maven-plugin.version}</version>
                    <configuration>
                        <args>
                            <arg>-deprecation</arg>
                            <arg>-explaintypes</arg>
                            <arg>-feature</arg>
                            <arg>-unchecked</arg>
                            <arg>-Xfatal-warnings</arg>
                            <arg>-Xlint:_</arg>
                            <arg>-Ywarn-dead-code</arg>
                            <arg>-Ywarn-extra-implicit</arg>
                            <arg>-Ywarn-numeric-widen</arg>
                            <arg>-Ywarn-self-implicit</arg>
                            <arg>-Ywarn-unused:_</arg>
                            <arg>-Ywarn-value-discard</arg>
                        </args>
                        <jvmArgs>
                            <jvmArg>-Xmx2048m</jvmArg>
                        </jvmArgs>
                        <source>${compiler.java.version}</source>
                        <target>${compiler.java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <scalaCompatVersion>${compiler.scala.compat.version}</scalaCompatVersion>
                        <checkMultipleScalaVersions>true</checkMultipleScalaVersions>
                        <failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
                        <sendJavaToScalac>false</sendJavaToScalac>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${compiler.java.version}</source>
                        <target>${compiler.java.version}</target>
                        <fork>true</fork>
                        <compilerArgs>
                            <arg>-Xlint:all</arg>
                            <arg>-deprecation</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven-plugin-plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-scala</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <!--Enforce Scala compilation before Java compilation-->
                    <execution>
                        <id>compile-java</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${compiler.scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scalariform</groupId>
            <artifactId>scalariform_${compiler.scala.compat.version}</artifactId>
            <version>${scalariform.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven-pligin-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven-plugin-annotations.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <inceptionYear>2011</inceptionYear>
    <url>http://github.com/tashoyan/scalariform-maven-plugin</url>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>git@github.com:tashoyan/scalariform-maven-plugin.git</url>
        <connection>scm:git:git@github.com:tashoyan/scalariform-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:tashoyan/scalariform-maven-plugin.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <id>mdr</id>
            <name>Matt Russell</name>
            <url>https://github.com/mdr/</url>
        </developer>
        <developer>
            <id>tashoyan</id>
            <name>Arseniy Tashoyan</name>
            <url>https://github.com/tashoyan</url>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-descriptor</id>
                                <goals>
                                    <goal>descriptor</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>help-descriptor</id>
                                <goals>
                                    <goal>helpmojo</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <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>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
