<?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>org.mule.tools.maven</groupId>
    <artifactId>mule-maven-plugins</artifactId>
    <packaging>pom</packaging>
    <version>3.0.0-M2</version>
    <name>Mule Maven Plugins</name>
    <modules>
        <module>mule-maven-plugin</module>
        <module>mule-maven-plugin-integration-tests</module>
    </modules>

    <properties>
        <javaVersion>1.8</javaVersion>
        <junit.version>4.8.2</junit.version>
        <license.path>LICENSE_HEADER</license.path>
        <maven.verifier.version>1.6</maven.verifier.version>
        <maven.license.plugin.version>1.8.0</maven.license.plugin.version>
        <maven.java.formatter.version>1.8.0</maven.java.formatter.version>
        <maven.resources.plugin.version>2.7</maven.resources.plugin.version>
        <formatter.path>formatter.xml</formatter.path>
        <formatterGoal>validate</formatterGoal>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.marvinformatics.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${maven.java.formatter.version}</version>
                    <configuration>
                        <compilerCompliance>${javaVersion}</compilerCompliance>
                        <compilerSource>${javaVersion}</compilerSource>
                        <compilerTargetPlatform>${javaVersion}</compilerTargetPlatform>
                        <configFile>${basedir}/${formatter.path}</configFile>
                        <configJsFile>${basedir}/${formatter.path}</configJsFile>
                        <lineEnding>LF</lineEnding>
                        <aggregator>false</aggregator>
                        <executionRoot>true</executionRoot>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>${formatterGoal}</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>${maven.license.plugin.version}</version>
                <configuration>
                    <header>${license.path}</header>
                    <excludes>
                        <exclude>target/**</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>LICENSE_HEADER</exclude>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/*.ftl</exclude>
                        <exclude>**/build-number.txt</exclude>
                        <exclude>**/*.ftl</exclude>
                        <exclude>**/assets/**</exclude>
                        <exclude>**/*.xsd</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>**/archetype-resources/**</exclude>
                        <exclude>**/src/main/java/package.html</exclude>
                    </excludes>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.marvinformatics.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${maven.java.formatter.version}</version>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-verifier</artifactId>
                <version>${maven.verifier.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>mule-releases</id>
            <name>MuleSoft Releases</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <repository>
            <id>mule-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/snapshots/</url>
        </repository>

        <!-- TODO why the heck we use this -->
        <repository>
            <id>jfrog</id>
            <name>jfrog repository</name>
            <layout>default</layout>
            <url>http://repo.jfrog.org/artifactory/plugins-releases-local</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>mule-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
        </pluginRepository>
        <pluginRepository>
            <id>mule-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/snapshots/</url>
        </pluginRepository>

        <!-- TODO why the heck we use this -->

        <pluginRepository>
            <id>jfrog</id>
            <name>jfrog repository</name>
            <layout>default</layout>
            <url>http://repo.jfrog.org/artifactory/plugins-releases-local</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <!-- TODO review this when the repo is firm -->
    <distributionManagement>
        <repository>
            <id>mule-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <connection>scm:git:git://github.com:mulesoft-labs/mule-maven-plugin.git
        </connection>
        <developerConnection>
            scm:git:git@github.com:mulesoft-labs/mule-maven-plugin.git
        </developerConnection>
        <url>http://github.com/mulesoft-labs/mule-maven-plugin</url>
      <tag>3.0.0-Milestone2</tag>
  </scm>

</project>