<?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.component</artifactId>
    <version>4.0.1</version>
    <parent>
        <groupId>eu.wdaqua.qanary</groupId>
        <artifactId>mvn.reactor</artifactId>
        <version>4.0.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <!-- java.version, spring-boot-admin.version, jena.version inherited from parent (task 2.2) -->

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>${spring-boot-admin.version}</version>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>eu.wdaqua.qanary</groupId>
            <artifactId>qa.commons</artifactId>
        </dependency>
        <!-- OpenAPI 3 / Swagger UI for every Qanary component (provides the UI + /api-docs;
             SwaggerUiRedirectController adds the /swagger, /openapi, /docs, /swagger-ui aliases) -->
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
            <version>${springdoc.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.reflections/reflections -->
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.10.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.jena/jena-arq -->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>${jena.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.jena/jena-core -->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-core</artifactId>
            <version>${jena.version}</version>
        </dependency>
        <!-- used directly by QanaryComponentConfiguration; previously came in
             transitively via Jena 4 (Jena 5 no longer pulls commons-cli) -->
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webflux</artifactId>
        </dependency>
        <!-- Annotation processor -->
        <dependency>
            <groupId>com.github.therapi</groupId>
            <artifactId>therapi-runtime-javadoc-scribe</artifactId>
            <version>0.15.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Runtime library -->
        <dependency>
            <groupId>com.github.therapi</groupId>
            <artifactId>therapi-runtime-javadoc</artifactId>
            <version>0.15.0</version>
        </dependency>
    </dependencies>

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

    <!-- Project name, Description, URL -->
    <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 -->
    <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 -->
    <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>
            <!-- JaCoCo scope override: AspectJ weaves the qa.commons dependency
                 into this module's target/classes; restrict coverage to the
                 classes this module actually owns (eu.wdaqua.qanary.component.*). -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jacoco-report</id>
                        <configuration>
                            <includes>
                                <include>eu/wdaqua/qanary/component/**</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>jacoco-check</id>
                        <configuration>
                            <includes>
                                <include>eu/wdaqua/qanary/component/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <!-- publishing/signing config inherited from the parent pluginManagement (task 2.2) -->
            <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>
            <!--	For Component Cache Tests	-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <!-- Components depend on this test-jar for
                                 AbstractSwaggerUiAvailabilityTest, but it must NOT
                                 ship QanaryComponentIntegrationTest: that class
                                 declares a nested @SpringBootApplication and a
                                 'testQanaryComponent' @Bean, which leak into
                                 downstream component-scans and cause
                                 NoUniqueBeanDefinitionException(QanaryComponent).
                                 The test still runs in this module's own build;
                                 it is only excluded from the published artifact. -->
                            <excludes>
                                <exclude>**/QanaryComponentIntegrationTest*.class</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.github.therapi</groupId>
                            <artifactId>therapi-runtime-javadoc-scribe</artifactId>
                            <version>0.15.0</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>