<?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>
    <parent>
        <groupId>app.myoss.cloud.codestyle</groupId>
        <artifactId>java-code-style</artifactId>
        <version>2.1.5.RELEASE</version>
    </parent>

    <artifactId>code-format-eclipse</artifactId>
    <name>code-format-eclipse</name>

    <description>myoss open source project, code style &amp; format written in Java</description>
    <url>https://github.com/myoss-cloud/java-code-style</url>
    <inceptionYear>2018</inceptionYear>

    <scm>
        <url>https://github.com/myoss-cloud/java-code-style</url>
        <connection>scm:git:https://github.com/myoss-cloud/java-code-style.git</connection>
    </scm>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jerry.Chen</name>
            <email>jerry.work@aliyun.com</email>
            <organizationUrl>https://github.com/myoss-cloud</organizationUrl>
            <url>https://github.com/myoss</url>
        </developer>
    </developers>

    <properties>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.github.myoss.eclipse</groupId>
            <artifactId>eclipse-code-formatter</artifactId>
            <version>18.0.132.637.0-Eclipse_4.7.3a</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <!-- 检查代码格式 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.1</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${puppycrawl-tools-checkstyle.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>app.myoss.cloud.codestyle</groupId>
                        <artifactId>code-format-checkstyle</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>checkstyle-validation</id>
                        <phase>validate</phase>
                        <configuration>
                            <skip>${disable.checks}</skip>
                            <configLocation>checkstyle/checkstyle.xml</configLocation>
                            <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
                            <headerLocation>checkstyle/checkstyle-header.txt</headerLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>