<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright 2017 - 2018 The ModiTect authors

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.

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

    <parent>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-org-parent</artifactId>
        <version>1.0.0.Final</version>
        <relativePath/>
    </parent>

    <artifactId>moditect-parent</artifactId>
    <version>1.0.0.RC2</version>
    <packaging>pom</packaging>

    <name>ModiTect Parent</name>
    <url>https://github.com/moditect/moditect</url>
    <description>Module system tooling</description>
    <inceptionYear>2017</inceptionYear>

    <properties>
        <project.identifier>moditect</project.identifier>
        <project.repository>moditect/moditect</project.repository>
        <local.repository.path>/tmp/repository</local.repository.path>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
    </properties>

    <scm>
        <connection>scm:git:${repository.url}</connection>
        <developerConnection>scm:git:${repository.url}</developerConnection>
        <url>${repository.url}</url>
        <tag>HEAD</tag>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>moditect</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.javaparser</groupId>
                <artifactId>javaparser-core</artifactId>
                <version>3.15.6</version>
            </dependency>
            <dependency>
                <groupId>com.google.testing.compile</groupId>
                <artifactId>compile-testing</artifactId>
                <version>0.10</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.8.0</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.30</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>${project.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration combine.self="override">
                    <header>${rootdir}/etc/license.txt</header>
                    <strictCheck>true</strictCheck>
                    <excludes>
                        <exclude>README.md</exclude>
                        <exclude>LICENSE.txt</exclude>
                        <exclude>mvnw</exclude>
                        <exclude>mvnw.cmd</exclude>
                        <exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
                        <exclude>.mvn/wrapper/MavenWrapperDownloader.java</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jreleaser</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <version>0.5.0</version>
                        <inherited>false</inherited>
                        <configuration>
                            <gitRootSearch>true</gitRootSearch>
                            <jreleaser>
                                <project>
                                    <name>ModiTect</name>
                                </project>
                                <release>
                                    <github>
                                        <skipTag>true</skipTag>
                                        <changelog>
                                            <formatted>ALWAYS</formatted>
                                        </changelog>
                                    </github>
                                </release>
                            </jreleaser>
                        </configuration>
                        <executions>
                            <execution>
                                <id>create-release</id>
                                <goals>
                                    <goal>release</goal>
                                </goals>
                                <phase>initialize</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
