<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.mulesoft.tools</groupId>
    <artifactId>mule-migration-tool-gateway</artifactId>
    <packaging>pom</packaging>
    <version>1.0.0</version>
    <modules>
        <module>mule-migration-tool-gateway-plugin</module>
        <module>mule-migration-tool-gateway-tests</module>
    </modules>

    <properties>
        <java.source>1.8</java.source>
        <java.target>1.8</java.target>
        <mule.migration.tool.version>1.0.0-SNAPSHOT</mule.migration.tool.version>

        <!-- License plugin properties -->
        <licensePath>LICENSE_HEADER.txt</licensePath>

        <!-- Formatter properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <formatterGoal>validate</formatterGoal>
        <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
        <javaFormatter.plugin.version>1.9.0</javaFormatter.plugin.version>
        <skipVerifications>false</skipVerifications>
        <mma.version>${project.version}</mma.version>
        <mule.version>4.1.5</mule.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${java.source}</source>
                    <target>${java.target}</target>
                    <encoding>ISO-8859-1</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <header>${licensePath}</header>
                    <excludes>
                        <exclude>**/target/**</exclude>
                        <exclude>**/.gitignore</exclude>
                        <exclude>**/bower_components/**</exclude>
                        <exclude>.idea/**</exclude>
                        <exclude>**/*.yaml</exclude>
                        <exclude>**/*.raml</exclude>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>**/*.out</exclude>
                        <exclude>**/*.xsd</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>**/*.woff</exclude>
                        <exclude>**/*.svg</exclude>
                        <exclude>**/*.ttf</exclude>
                        <exclude>**/*.otf</exclude>
                        <exclude>**/*.eot</exclude>
                        <exclude>**/spring.handlers</exclude>
                        <exclude>**/spring.schemas</exclude>
                        <exclude>**/*.html</exclude>
                        <exclude>**/*.css</exclude>
                        <exclude>**/*.js</exclude>
                        <exclude>**/*.groovy</exclude>
                        <exclude>**/build-number.txt</exclude>
                    </excludes>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <strictCheck>true</strictCheck>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.marvinformatics.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${javaFormatter.plugin.version}</version>
                <configuration>
                    <compilerCompliance>${java.source}</compilerCompliance>
                    <compilerSource>${java.source}</compilerSource>
                    <compilerTargetPlatform>${java.source}</compilerTargetPlatform>
                    <configFile>${basedir}/${formatterConfigPath}</configFile>
                    <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                    <aggregator>false</aggregator>
                    <executionRoot>true</executionRoot>
                </configuration>
                <executions>
                    <execution>
                        <id>apply-format</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>${formatterGoal}</goal>
                        </goals>
                        <configuration>
                            <skipFormatting>${skipVerifications}</skipFormatting>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>mule-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
        </repository>
        <repository>
            <id>mule-nexus-snapshots</id>
            <name>Mule EE Snapshots Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>mulesoft-ci-releases</id>
            <name>Mule EE Snapshots Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/ci-releases</url>
        </repository>
    </repositories>


    <distributionManagement>
        <repository>
            <id>mule-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>https://repository-master.mulesoft.org/releases/</url>
        </repository>
        <snapshotRepository>
            <id>mule-ee-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

</project>
