<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>org.mule.tooling</groupId>
    <artifactId>mule-tooling-api-parent</artifactId>
    <version>1.0.0-FD.2</version>
    <packaging>pom</packaging>
    <name>Mule Tooling API :: Parent POM</name>
    <description>Parent POM for Mule Tooling API modules</description>
    <url>https://github.com/mulesoft/mule-tooling-api</url>

    <organization>
        <name>MuleSoft, Inc.</name>
        <url>http://www.mulesoft.com</url>
    </organization>
    <licenses>
        <license>
            <name>CPAL v1.0</name>
            <url>http://www.mulesoft.com/CPAL</url>
        </license>
    </licenses>
    <mailingLists>
        <mailingList>
            <name>developers</name>
            <post>mule-esb@mulesoft.com</post>
        </mailingList>
    </mailingLists>

    <modules>
        <module>mule-runtime-tooling-api</module>
        <module>mule-runtime-tooling-bootstrap</module>
    </modules>

    <developers>
        <developer>
            <id>canoasan</id>
            <name>Matias Baldini</name>
            <email>matias.baldini@mulesoft.com</email>
            <roles>
                <role>Project Manager</role>
            </roles>
        </developer>
        <developer>
            <id>pablolagreca</id>
            <name>Pablo La Greca</name>
        </developer>
        <developer>
            <id>gsfernandes</id>
            <name>Guillermo Fernandes</name>
        </developer>
        <developer>
            <id>mbuchwald</id>
            <name>Martin Buchwald</name>
        </developer>
    </developers>
    <issueManagement>
        <system>jira</system>
        <url>http://www.mulesoft.org/jira/browse/MULE</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/mulesoft/mule-tooling-api.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/mule-tooling-api.git</developerConnection>
        <url>https://github.com/mulesoft/mule-tooling-api</url>
    </scm>

    <properties>
        <javaVersion>1.8</javaVersion>
        <formatterGoal>validate</formatterGoal>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
        <project.reporting.outputEncoding>ISO-8859-1</project.reporting.outputEncoding>

        <maven.version>3.3.9</maven.version>

        <mule.api.version>1.0.0-FD.2</mule.api.version>
        <mule.datasense.version>4.0.0-FD.2</mule.datasense.version>

        <mule.metadata.model.api.version>1.0.0-FD.2</mule.metadata.model.api.version>
        <mule.extensions.api.version>1.0.0-FD.2</mule.extensions.api.version>
        <mule.runtime.event.model>1.0.0-FD.2</mule.runtime.event.model>
        <mule.maven.client.version>1.0.0-FD.2</mule.maven.client.version>
        <mule.maven.client.impl.version>1.0.0-FD.2</mule.maven.client.impl.version>

        <maven.dependency.plugin.version>2.10</maven.dependency.plugin.version>
        <maven.assembly.plugin.version>3.0.0</maven.assembly.plugin.version>
        <mule.assembly.verifier.version>1.4</mule.assembly.verifier.version>

        <log4j.version>2.5</log4j.version>
        <slf4j.version>1.7.7</slf4j.version>

        <mockitoVersion>1.9.5</mockitoVersion>
        <junitVersion>4.12</junitVersion>
        <hamcrestVersion>1.3</hamcrestVersion>
        <javaFormatter.plugin.version>1.8.0</javaFormatter.plugin.version>

        <allureJunitVersion>1.4.23.HOTFIX1</allureJunitVersion>
        <allure.maven.plugin.version>2.5</allure.maven.plugin.version>

        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <skipVerifications>false</skipVerifications>
    </properties>

    <!--
        group/artifact id only, version and exclusions are specified
        via dependency management
    -->

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-api</artifactId>
                <version>${mule.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-metadata-model-api</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-metadata-model-java</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-metadata-model-json</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-metadata-model-persistence</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.tooling</groupId>
                <artifactId>mule-runtime-event-model</artifactId>
                <version>${mule.runtime.event.model}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-metadata-model-xml</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-message-metadata-model</artifactId>
                <version>${mule.metadata.model.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-datasense-api</artifactId>
                <version>${mule.datasense.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-extensions-api</artifactId>
                <version>${mule.extensions.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-extensions-api-dsql</artifactId>
                <version>${mule.extensions.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-extensions-api-persistence</artifactId>
                <version>${mule.extensions.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-maven-client-api</artifactId>
                <version>${mule.maven.client.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-maven-client-impl</artifactId>
                <version>${mule.maven.client.impl.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!--Logging-->

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- Allure -->
            <dependency>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-junit-adaptor</artifactId>
                <version>${allureJunitVersion}</version>
            </dependency>

            <dependency>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-java-annotations</artifactId>
                <version>${allureJunitVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Logger -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>${hamcrestVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junitVersion}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockitoVersion}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <encoding>ISO-8859-1</encoding>
                        <fork>true</fork>
                        <maxmem>512m</maxmem>
                        <source>1.8</source>
                        <target>1.8</target>
                        <proc>none</proc>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.11</version>
                    <configuration>
                        <header>com/mycila/maven/plugin/license/templates/CPAL.txt</header>
                        <properties>
                            <owner>MuleSoft, Inc</owner>
                            <project.url>http://www.mulesoft.com</project.url>
                        </properties>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <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>${javaVersion}</compilerCompliance>
                        <compilerSource>${javaVersion}</compilerSource>
                        <compilerTargetPlatform>${javaVersion}</compilerTargetPlatform>
                        <configFile>${basedir}/${formatterConfigPath}</configFile>
                        <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                        <lineEnding>LF</lineEnding>
                        <aggregator>false</aggregator>
                        <executionRoot>true</executionRoot>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>${formatterGoal}</goal>
                            </goals>
                            <configuration>
                                <skipFormatting>${skipVerifications}</skipFormatting>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven.assembly.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.mule.tools</groupId>
                    <artifactId>mule-assembly-verifier</artifactId>
                    <version>${mule.assembly.verifier.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.marvinformatics.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <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>

    <repositories>
        <repository>
            <id>mule</id>
            <name>Mule Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>mule-plugin</id>
            <name>Mule Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <skipVerifications>false</skipVerifications>
                <skipGpg>false</skipGpg>
            </properties>
            <build>
                <plugins>
                    <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>
                        <configuration>
                            <additionalparam>${xDocLint}</additionalparam>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <skip>${skipGpg}</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>allure</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <testFailureIgnore>true</testFailureIgnore>
                                <argLine>
                                    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjVersion}/aspectjweaver-${aspectjVersion}.jar
                                </argLine>
                                <properties>
                                    <property>
                                        <name>listener</name>
                                        <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                                    </property>
                                </properties>
                                <systemPropertyVariables>
                                    <allure.profile.is.activated>true</allure.profile.is.activated>
                                </systemPropertyVariables>
                            </configuration>
                            <dependencies>
                                <dependency>
                                    <groupId>org.aspectj</groupId>
                                    <artifactId>aspectjweaver</artifactId>
                                    <version>${aspectjVersion}</version>
                                </dependency>
                            </dependencies>
                        </plugin>

                        <!--Needed only to show reports locally. Run jetty:run and open localhost:8080 to show the report-->
                        <plugin>
                            <groupId>org.eclipse.jetty</groupId>
                            <artifactId>jetty-maven-plugin</artifactId>
                            <version>${jetty.maven.plugin.version}</version>
                            <configuration>
                                <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
                                <stopKey>stop</stopKey>
                                <stopPort>1234</stopPort>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>

            <reporting>
                <excludeDefaults>true</excludeDefaults>
                <plugins>
                    <plugin>
                        <groupId>ru.yandex.qatools.allure</groupId>
                        <artifactId>allure-maven-plugin</artifactId>
                        <version>${allure.maven.plugin.version}</version>
                    </plugin>
                </plugins>
            </reporting>
        </profile>

    </profiles>

</project>
