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

    Copyright 2022 Rudy De Busscher (https://www.atbash.be)

    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>

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

    <name>Integration Testing for Jakarta EE runtimes</name>
    <inceptionYear>2022</inceptionYear>
    <description>Integration Testing parent</description>
    <url>https://github.com/atbashEE/jakarta-integration-testing</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://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/jakarta-integration-testing.git</connection>
        <developerConnection>scm:git:ssh://github.com/atbashEE/jakarta-integration-testing.git</developerConnection>
        <url>https://github.com/atbashEE/jakarta-integration-testing/tree/main</url>
    </scm>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <modules>
        <module>impl</module>
        <module>example</module>
    </modules>

    <build>
        <plugins>

            <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>
                        <site>https://www.atbash.be</site>
                        <aggregate>true</aggregate>
                    </properties>
                    <excludes>
                        <exclude>**/*.adoc</exclude>
                        <exclude>**/*.adi</exclude>
                        <exclude>**/*.jwk</exclude>
                        <exclude>**/README</exclude>
                        <exclude>**/LICENSE.txt</exclude>
                        <exclude>**/NOTICE.txt</exclude>
                        <exclude>**/NOTICE</exclude>
                        <exclude>**/config.yml</exclude>
                        <exclude>**/*.sh</exclude>
                        <exclude>**/Dockerfile</exclude>
                        <exclude>**/test.txt</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>

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

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