<!--
  ~ Copyright 2022 - 2026 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.elasticsoftwarefoundation.akces</groupId>
        <artifactId>akces-crypto-trading-parent</artifactId>
        <version>0.13.0</version>
    </parent>
    <artifactId>akces-crypto-trading-aggregates</artifactId>
    <name>Elastic Software Foundation :: Akces :: Test Apps :: Crypto Trading :: Aggregates</name>
    <description>Crypto Trading Akces Test Application</description>
    <properties>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>

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

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

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>

        <dependency>
            <groupId>org.elasticsoftwarefoundation.akces</groupId>
            <artifactId>akces-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.elasticsoftwarefoundation.akces</groupId>
            <artifactId>akces-runtime</artifactId>
        </dependency>

        <dependency>
            <groupId>org.elasticsoftwarefoundation.akces</groupId>
            <artifactId>akces-client</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.elasticsoftwarefoundation.akces</groupId>
            <artifactId>akces-eventcatalog</artifactId>
            <scope>provided</scope>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-Aeventcatalog.repositoryBaseUrl=https://github.com/elasticsoftwarefoundation/akces-framework/tree/main/test-apps/crypto-trading/aggregates/src/main/java</arg>
                        <arg>-Aeventcatalog.owners=framework-developers</arg>
                        <arg>-Aeventcatalog.schemaDomain=crypto-trading</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>org.elasticsoftware.akces.AggregateServiceApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <id>process-aot</id>
                        <goals>
                            <goal>process-aot</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.elasticsoftware.akces.AggregateServiceApplication</mainClass>
                            <arguments>
                                <argument>org.elasticsoftware.cryptotrading.AggregateConfig</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <!--                    <execution>-->
                    <!--                        <id>process-test-aot</id>-->
                    <!--                        <goals>-->
                    <!--                            <goal>process-test-aot</goal>-->
                    <!--                        </goals>-->
                    <!--                    </execution>-->
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>commands-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>commands</classifier>
                            <includes>
                                <include>**/commands/*</include>
                                <include>**/data/*</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>events-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>events</classifier>
                            <includes>
                                <include>**/events/*</include>
                                <include>**/data/*</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>services-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>services</classifier>
                            <includes>
                                <include>**/services/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
<!--            <plugin>-->
<!--                 <artifactId>maven-surefire-plugin</artifactId>-->
<!--                <configuration>-->
<!--                    <argLine>-Dspring.aot.enabled=true</argLine>-->
<!--                </configuration>-->
<!--            </plugin>-->
        </plugins>
    </build>

</project>
