<?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.finra.megasparkdiff</groupId>
    <artifactId>mega-spark-diff-parent</artifactId>
    <version>0.3.0</version>
    <packaging>pom</packaging>

    <name>MegaSparkDiffParent</name>
    <description>A diff analysis tool that compares data sets at scale of various types and can be executed in CLOUD or
        locally
    </description>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <url>http://github.com/FINRAOS/MegaSparkDiff</url>
    <scm>
        <connection>scm:git:http://github.com/FINRAOS/MegaSparkDiff</connection>
        <developerConnection>scm:git:http://github.com/FINRAOS/MegaSparkDiff</developerConnection>
        <url>http://github.com/FINRAOS/MegaSparkDiff</url>
    </scm>
    <developers>
        <developer>
            <id>aosama</id>
            <name>Ahmed Ibrahim</name>
            <email>aosama@gmail.com</email>
        </developer>
        <developer>
            <id>garc000</id>
            <name>Carlos Garcia</name>
            <email>garc000@gmail.com</email>
        </developer>
        <developer>
            <id>shraddhakpatel12</id>
            <name>Shraddha Patel</name>
            <email>shraddhakpatel12@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
        <maven.dependency.plugin.version>3.3.0</maven.dependency.plugin.version>
        <maven.jar.plugin.version>3.2.2</maven.jar.plugin.version>
        <scala.maven.plugin.version>4.7.1</scala.maven.plugin.version>
        <spark.version>3.1.3</spark.version>
        <scala.version>2.12.16</scala.version>
        <scala.major.version>2.12</scala.major.version>
    </properties>

    <modules>
        <module>mega-spark-diff</module>
        <module>examples/TransformationTesting</module>
    </modules>

    <profiles>
        <profile>
            <id>mavencentral</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven.compiler.plugin.version}</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${maven.dependency.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${project.build.directory}/allDependencies</outputDirectory>
                                    <overWriteReleases>false</overWriteReleases>
                                    <overWriteSnapshots>false</overWriteSnapshots>
                                    <overWriteIfNewer>true</overWriteIfNewer>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.scm</groupId>
                                <artifactId>maven-scm-provider-gitexe</artifactId>
                                <version>1.11.2</version>
                            </dependency>
                        </dependencies>
                    </plugin>

                    <plugin>
                        <groupId>net.alchim31.maven</groupId>
                        <artifactId>scala-maven-plugin</artifactId>
                        <version>${scala.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>compile</id>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                            <execution>
                                <id>test-compile</id>
                                <goals>
                                    <goal>testCompile</goal>
                                </goals>
                                <phase>test-compile</phase>
                            </execution>
                            <execution>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>${maven.jar.plugin.version}</version>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <classpathPrefix>lib/</classpathPrefix>
                                    <mainClass>org.finra.msd.launcher.Launcher</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                    </plugin>

                    <!--<plugin>-->
                    <!--<groupId>org.apache.maven.plugins</groupId>-->
                    <!--<artifactId>maven-checkstyle-plugin</artifactId>-->
                    <!--<version>2.15</version>-->
                    <!--<executions>-->
                    <!--<execution>-->
                    <!--<id>test</id>-->
                    <!--<phase>test</phase>-->
                    <!--<configuration>-->
                    <!--<configLocation>config/sun_checkstyle.xml</configLocation>-->
                    <!--<headerLocation>config/java.header</headerLocation>-->
                    <!--<includeTestSourceDirectory>true</includeTestSourceDirectory>-->
                    <!--<includeResources>true</includeResources>-->
                    <!--<includeTestResources>true</includeTestResources>-->
                    <!--<resourceIncludes>**/*.*</resourceIncludes>-->
                    <!--<encoding>UTF-8</encoding>-->
                    <!--<consoleOutput>true</consoleOutput>-->
                    <!--<failOnViolation>true</failOnViolation>-->
                    <!--<failsOnError>true</failsOnError>-->
                    <!--</configuration>-->
                    <!--<goals>-->
                    <!--<goal>check</goal>-->
                    <!--</goals>-->
                    <!--</execution>-->
                    <!--</executions>-->
                    <!--</plugin>-->

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.1.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>


                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>3.8.2</version>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                    <configuration>
                                        <gpgArguments>
                                            <arg>--pinentry-mode</arg>
                                            <arg>loopback</arg>
                                        </gpgArguments>
                                    </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala.maven.plugin.version}</version>
                <configuration>
                    <jvmArgs>
                        <jvmArg>-Xms64m</jvmArg>
                        <jvmArg>-Xmx1024m</jvmArg>
                    </jvmArgs>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
