<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <artifactId>spring-boot-starter-parent</artifactId>
        <groupId>org.springframework.boot</groupId>
        <version>2.6.7</version>
        <relativePath/>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <modules>
        <module>order-service</module>
        <module>common</module>
        <module>infrastructure</module>
        <module>infrastructure/kafka</module>
        <module>customer-service</module>
        <module>payment-service</module>
        <module>restaurant-service</module>
    </modules>


    <groupId>com.food.order</groupId>
    <artifactId>food-ordering-system</artifactId>
    <version>1.0-SNAPSHOT</version>

    <packaging>pom</packaging>

    <properties>
        <maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
        <mockito.version>4.3.1</mockito.version>
        <spring-kafka.version>2.8.2</spring-kafka.version>
        <kavka-avro.serializer.version>7.0.1</kavka-avro.serializer.version>
        <avro.version>1.11.0</avro.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-core-domain</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>outbox</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>customer-domain-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>customer-service-application</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>customer-application</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>customer-data-access</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>customer-messaging</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>payment-domain</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-app</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>payment-application-service</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>saga</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>payment-domain-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>payment-dataaccess</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>payment-messaging</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-application-service</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-application</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>common-application</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>kafka-producer</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>restaurant-application-service</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>common-data-access</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>restaurant-dataaccess</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>restaurant-messaging</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>restaurant-core-domain</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>restaurant-domain</artifactId>
                <version>${project.version}</version>
            </dependency>


            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>kafka-consumer</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>kafka-model</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>kafka-config</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-data-access</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>common-domain</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.food.order</groupId>
                <artifactId>order-messaging</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <release>17</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.ferstl</groupId>
                <artifactId>depgraph-maven-plugin</artifactId>
                <version>4.0.1</version>
                <configuration>
                    <scope>compile</scope>
                    <graphFormat>puml</graphFormat>
                    <createImage>true</createImage>
                    <excludes>
                        <exclude>org.slf4j:slf4j-api</exclude>
                        <exclude>com.google.guava:guava</exclude>
                        <exclude>io.vavr:vavr</exclude>
                    </excludes>
                    <transitiveExcludes>
                        <transitiveExclude>*</transitiveExclude>
                    </transitiveExcludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>