<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    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>eu.wdaqua.qanary</groupId>
    <artifactId>qa.qanarycomponent-parent</artifactId>
    <version>4.0.0</version>
    <packaging>pom</packaging>
    <parent>
        <groupId>eu.wdaqua.qanary</groupId>
        <artifactId>mvn.reactor</artifactId>
        <version>4.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <properties>
        <!-- java.version, spring-boot-admin.version, springdoc.version inherited from parent (task 2.2) -->
        <qanary.component.version>4.0.0</qanary.component.version>
        <qanary.commons.version>4.0.0</qanary.commons.version>
        <json-path.version>3.0.0</json-path.version>
    </properties>

    <!-- common dependencies that are implemented by all components -->

    <dependencies>
        <dependency>
            <groupId>eu.wdaqua.qanary</groupId>
            <artifactId>qa.component</artifactId>
            <version>${qanary.component.version}</version>
        </dependency>
        <dependency>
            <groupId>eu.wdaqua.qanary</groupId>
            <artifactId>qa.commons</artifactId>
            <version>${qanary.commons.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>${spring-boot-admin.version}</version>
        </dependency>
    </dependencies>

    <!-- common dependencies that may be implemented by some components -->
    <dependencyManagement>
        <dependencies>
            <!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path -->
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${json-path.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path-assert -->
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path-assert</artifactId>
                <version>${json-path.version}</version>
                <scope>test</scope>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-starter-webmvc-ui -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
                <version>${springdoc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
                <version>${springdoc.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- START - Setup for deployment to maven repository -->

    <!-- Project name, Description, URL; inherited by default -->
    <name>${project.groupId}:${project.artifactId}</name> <!--  Assembling name from project and artifact id-->
    <description>Qanary component template package</description>
    <url>https://github.com/WDAqua/Qanary/</url>

    <!-- Source-Control-Management information (SCM) -->
    <scm>
        <connection>scm:git:git://github.com/WDAqua/Qanary.git</connection>
        <developerConnection>scm:git:ssh://github.com/WDAqua/Qanary.git</developerConnection>
        <url>https://github.com/WDAqua/Qanary</url>
    </scm>

    <!-- Developer information, inherited by default -->
    <developers>
        <developer>
            <name>Andreas Both</name>
            <email>andreas.both@htwk-leipzig.de</email>
            <organization>WDAqua</organization>
            <organizationUrl>http://wdaqua.eu/</organizationUrl>
        </developer>
    </developers>

    <!-- Licence information, inherited by default -->
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name> <!-- Example for Apache2 Licence -->
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <!-- Example for Apache2 Licence -->
        </license>
    </licenses>

    <!-- -->
    <!-- END - Setup for deployment to maven repository -->

    <build>
        <plugins>
            <!-- Deployment/Release related plugins -->
            <!-- release/publishing/signing config inherited from the parent
                 pluginManagement (task 2.2) -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>dev.aspectj</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.14.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.9.25</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <complianceLevel>${java.version}</complianceLevel>
                    <additionalCompilerArgs>
                        <arg>-parameters</arg>
                    </additionalCompilerArgs>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <weaveDependencies>
                        <weaveDependency>
                            <groupId>eu.wdaqua.qanary</groupId>
                            <artifactId>qa.commons</artifactId>
                        </weaveDependency>
                    </weaveDependencies>
                    <verbose>true</verbose>
                    <showWeaveInfo>true</showWeaveInfo>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>