<?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>com.mulesoft.tools</groupId>
    <artifactId>mel-dw-migrator</artifactId>
    <version>1.0.0-SNAPSHOT</version>

    <name>MEL to DW Migrator</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.plugin.version>3.1</maven.compiler.plugin.version>
        <build.helper.maven.plugin.version>1.10</build.helper.maven.plugin.version>
        <scala.maven.plugin.version>3.2.2</scala.maven.plugin.version>
        <scalatest.maven.plugin.version>2.0.0</scalatest.maven.plugin.version>
        <maven.surefire.plugin.version>2.7</maven.surefire.plugin.version>

        <java.version>1.8</java.version>
        <scala.version>2.12.5</scala.version>
        <parboiled.version>2.1.4</parboiled.version>
        <scalatest.version>3.0.1</scalatest.version>
        <parser.version>2.1.3-SNAPSHOT</parser.version>
    </properties>

    <build>
        <plugins>        
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build.helper.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/main/scala</source>
                            </sources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/scala</source>                                
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>            
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala.maven.plugin.version}</version>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                </configuration>
                <executions>
                    <execution>
                        <goals>                            
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>${scalatest.maven.plugin.version}</version>
                <configuration>                    
                    <junitxml>.</junitxml>                
                </configuration>
                <executions>
                    <execution>
                        <id>test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>        
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.parboiled</groupId>
            <artifactId>parboiled_2.12</artifactId>
            <version>${parboiled.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.12</artifactId>
            <version>${scalatest.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.weave</groupId>
            <artifactId>parser</artifactId>
            <version>${parser.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <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/mel-dw-migrator.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft-labs/mel-dw-migrator.git</developerConnection>
        <url>https://github.com/mulesoft-labs/mel-dw-migrator</url>
        <tag>HEAD</tag>
    </scm>
</project>