<?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</groupId>
    <artifactId>apikit-parent</artifactId>
    <version>3.9.3</version>
    <packaging>pom</packaging>
    <name>APIKit parent</name>

    <modules>
        <module>parser-wrapper</module>
        <module>apikit-spi</module>
        <module>mule-module-apikit</module>
        <module>distribution</module>
        <module>apikit-tools</module>
        <module>apikit-examples</module>
    </modules>

    <properties>
        <!--mule community version-->
        <mule.version>3.9.3-SNAPSHOT</mule.version>
        <cors.module.version>2.1.4</cors.module.version>
        <licensePath>LICENSE_HEADER.txt</licensePath>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <raml.parser.v1.version>0.8.29</raml.parser.v1.version>
        <raml.parser.v2.version>1.0.35</raml.parser.v2.version>

        <!--sonar-->
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.jacoco.reportPaths>target/jacoco.exec</sonar.jacoco.reportPaths>
        <sonar.language>java</sonar.language>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.raml</groupId>
                <artifactId>raml-parser</artifactId>
                <version>${raml.parser.v1.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.module</groupId>
                        <artifactId>jackson-module-jsonSchema</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-jsonSchema</artifactId>
                <version>2.9.8</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.9.8</version>
            </dependency>
            <dependency>
                <groupId>org.raml</groupId>
                <artifactId>raml-parser-2</artifactId>
                <version>${raml.parser.v2.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.module</groupId>
                        <artifactId>jackson-module-jsonSchema</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.googlecode.json-simple</groupId>
                <artifactId>json-simple</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
        </repository>
        <snapshotRepository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>https://repository-master.mulesoft.org/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.11</version>
                    <configuration>
                        <skip>${skipVerifications}</skip>
                        <header>com/mycila/maven/plugin/license/templates/CPAL.txt</header>
                        <properties>
                            <owner>MuleSoft, Inc</owner>
                            <project.url>http://www.mulesoft.com</project.url>
                        </properties>
                        <excludes>
                            <exclude>target/**</exclude>
                            <exclude>**/.gitignore</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.groovy</exclude>
                            <exclude>**/*.sh</exclude>
                            <exclude>**/*.bat</exclude>
                            <exclude>**/*.ftl</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.sample</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/*.xsl</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/*.css</exclude>
                            <exclude>**/build-number.txt</exclude>

                            <exclude>**/org/springframework/**</exclude>
                            <exclude>**/HttpTransactionContext.java</exclude>
                            <exclude>**/HttpConnection.java</exclude>
                            <exclude>**/BndMojo.java</exclude>
                            <exclude>**/BobberArchetype.java</exclude>
                            <exclude>**/BobberArchetypeMojo.java</exclude>
                            <exclude>**/DummySSLServerSocketFactory.java</exclude>
                            <exclude>**/MultipartConfiguration.java</exclude>

                            <exclude>**/ParamReader.java</exclude>
                            <exclude>**/Part.java</exclude>
                            <exclude>**/XMLStreamReaderToContentHandler.java</exclude>
                            <exclude>**/__artifactId__IBean.java</exclude>
                            <exclude>**/__artifactId__IBeanTestCase.java</exclude>
                        </excludes>
                        <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>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.7.201606060606</version>
                <configuration>
                    <destFile>${sonar.jacoco.reportPaths}</destFile>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>security</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.5.1</version>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.directory}/lib/</outputDirectory>
                                    <includeScope>runtime</includeScope>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:git://github.com:mulesoft/apikit.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/apikit.git</developerConnection>
        <url>http://github.com/mulesoft/apikit</url>
        <tag>HEAD</tag>
    </scm>

</project>
