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

    Copyright 2017-2022 Rudy De Busscher

    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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <groupId>be.atbash.config</groupId>
    <artifactId>config-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <properties>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <atbash-utils.version>1.1.0</atbash-utils.version>
        <microprofile-config.version>1.1</microprofile-config.version>

        <javax.annotation.version>1.3</javax.annotation.version>

        <assertj.version>3.12.0</assertj.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <name>Atbash Configuration</name>
    <inceptionYear>2017</inceptionYear>
    <description>Atbash Configuration parent</description>
    <url>https://raw.githubusercontent.com/atbashEE/atbash-config/master/impl/src/main/doc/manual.adoc</url>

    <developers>
        <developer>
            <id>rubus</id>
            <name>Rudy De Busscher</name>
            <email>rdebusscher@gmail.com</email>
            <organization>Atbash, Belgium</organization>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/atbashEE/atbash-config.git</connection>
        <developerConnection>scm:git:ssh://github.com:atbashEE/atbash-config.git</developerConnection>
        <url>http://github.com/atbashEE/atbash-config/tree/master</url>
    </scm>

    <repositories>
        <repository>
            <id>snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>2.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>test</module>
        <module>impl</module>
        <module>alias-test</module>
        <module>examples</module>

    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>clirr-maven-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <ignored>

                        <difference>
                            <!-- Breaking change due to dropping support Java 8 and introduce Optional -->
                            <className> be.atbash.config.ConfigOptionalValue</className>
                            <differenceType>8001</differenceType>
                        </difference>

                        <difference>
                            <!-- Breaking change due to dropping support Java 8 and introduce Optional -->
                            <className>be.atbash.config.test.TestConfig</className>
                            <differenceType>7006</differenceType>
                            <method>getOptionalValue</method>
                            <to>*</to>
                        </difference>

                    </ignored>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>src/etc/headerTemplate.txt</header>
                    <properties>
                        <owner>Rudy De Busscher</owner>
                        <year>2017</year>
                    </properties>
                    <excludes>
                        <exclude>**/*.adoc</exclude>
                        <exclude>**/README</exclude>
                        <exclude>**/LICENSE.txt</exclude>
                        <exclude>**/NOTICE.txt</exclude>
                        <exclude>**/NOTICE</exclude>
                        <exclude>**/converters/**</exclude>
                    </excludes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin-git</artifactId>
                        <version>3.0</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <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>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Configure the jar with the javadoc (or rather, convince Maven that
                        we want javadoc at all) -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <configuration>
                            <javadocVersion>1.8</javadocVersion>
                            <notimestamp>true</notimestamp>
                            <!--splitindex>true</splitindex-->
                            <doctitle>${project.name} ${project.version}</doctitle>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <bottom>
                                <![CDATA[]]>
                            </bottom>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>

        </profile>
    </profiles>
</project>
