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

    SPDX-License-Identifier: Apache-2.0

    Copyright 2013 - 2022 Andres Almiray.

    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

        https://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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.kordamp.maven</groupId>
        <artifactId>kordamp-parent</artifactId>
        <version>1.4.0</version>
    </parent>

    <groupId>org.kordamp.jipsy</groupId>
    <artifactId>jipsy-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <properties>
        <project.identifier>jipsy</project.identifier>
        <project.github.repository>kordamp/jipsy</project.github.repository>
        <local.repository.path>/tmp/repository</local.repository.path>
        <pomchecker.version>${project.version}</pomchecker.version>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <version.moditect.plugin>1.0.0.RC2</version.moditect.plugin>
    </properties>

    <name>jipsy-parent</name>
    <description>Configurable Java Annotation Processor to simplify the use of
        the Service Provider Interface</description>
    <url>http://github.com/kordamp/jipsy</url>
    <inceptionYear>2013</inceptionYear>

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

    <modules>
        <module>jipsy-annotations</module>
        <module>jipsy-processor</module>
        <module>jipsy-util</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <compilerArgument>-proc:none</compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>${version.moditect.plugin}</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>
                    <headerDefinitions>
                        <headerDefinition>${rootdir}/etc/header-definition.xml</headerDefinition>
                    </headerDefinitions>
                    <strictCheck>true</strictCheck>
                    <properties>
                        <author>Andres Almiray</author>
                    </properties>
                    <excludes>
                        <exclude>**/*.adoc</exclude>
                        <exclude>LICENSE</exclude>
                        <exclude>NOTICE.txt</exclude>
                        <exclude>.github/**/*</exclude>
                        <exclude>mvnw</exclude>
                        <exclude>mvnw.cmd</exclude>
                        <exclude>.mvn/wrapper/*</exclude>
                        <exclude>out/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>test</id>
            <activation>
                <property>
                    <name>release</name>
                    <value>!true</value>
                </property>
            </activation>
            <modules>
                <module>jipsy-test-support</module>
                <module>jipsy-tests</module>
            </modules>
        </profile>
        <profile>
            <id>publication</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.coderplus.maven.plugins</groupId>
                        <artifactId>copy-rename-maven-plugin</artifactId>
                        <version>1.0.1</version>
                        <executions>
                            <execution>
                                <id>copy-notice-file</id>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <phase>generate-sources</phase>
                                <configuration>
                                    <sourceFile>${session.executionRootDirectory}/NOTICE.txt</sourceFile>
                                    <destinationFile>${project.build.outputDirectory}/META-INF/NOTICE-${project.identifier}</destinationFile>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
