<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 The original authors

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>
    <parent>
        <groupId>io.streamthoughts</groupId>
        <artifactId>jikkou</artifactId>
        <version>0.26.0</version>
    </parent>

    <artifactId>jikkou-extension-core</artifactId>

    <description>Core extensions for Jikkou</description>

    <properties>
        <license.header.file>${project.parent.basedir}/license-header</license.header.file>
        <maven-clean-plugin.directory>${project.basedir}/src/main/java/io/streamthoughts/jikkou/core/models
        </maven-clean-plugin.directory>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>jikkou-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>jikkou-resource-generator</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <!-- START dependencies for test -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- END dependencies for test -->
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${maven-clean-plugin.directory}</directory>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                            <useDefaultExcludes>true</useDefaultExcludes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <dependencies>
                    <dependency>
                        <groupId>io.streamthoughts</groupId>
                        <artifactId>jikkou-resource-generator</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
                <groupId>org.jsonschema2pojo</groupId>
                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
                <version>1.1.2</version>
                <configuration>
                    <sourceDirectory>${project.basedir}/src/main/json</sourceDirectory>
                    <targetPackage>io.streamthoughts.jikkou.core.models</targetPackage>
                    <generateBuilders>false</generateBuilders>
                    <addCompileSourceRoot>true</addCompileSourceRoot>
                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
                    <includeSetters>false</includeSetters>
                    <includeGetters>true</includeGetters>
                    <useInnerClassBuilders>false</useInnerClassBuilders>
                    <includeJsr303Annotations>false</includeJsr303Annotations>
                    <useJakartaValidation>true</useJakartaValidation>
                    <includeHashcodeAndEquals>true</includeHashcodeAndEquals>
                    <includeAllPropertiesConstructor>true</includeAllPropertiesConstructor>
                    <includeConstructorPropertiesAnnotation>true</includeConstructorPropertiesAnnotation>
                    <includeConstructors>true</includeConstructors>
                    <customAnnotator>io.streamthoughts.jikkou.generator.JikkouAnnotator</customAnnotator>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>