<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2022-2026 benelog GmbH & Co. KG

        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>io.openepcis</groupId>
        <artifactId>openepcis-document-converter-parent</artifactId>
        <version>0.9.3</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>converter-service-rest</artifactId>
    <name>converter-service-rest</name>
    <description>REST Resources to convert the EPCIS 2.0 documents and identifiers from one standard format to another</description>
    <url>https://github.com/openepcis/openepcis-document-converter</url>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
                <configuration>
                    <systemPropertyVariables>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <maven.home>${maven.home}</maven.home>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-extension-maven-plugin</artifactId>
                <configuration>
                    <parentFirstArtifacts>
                        <parentFirstArtifact>io.quarkus:quarkus-bootstrap-core</parentFirstArtifact>
                        <parentFirstArtifact>io.quarkus:quarkus-development-mode-spi</parentFirstArtifact>
                        <parentFirstArtifact>org.jboss.logmanager:jboss-logmanager-embedded</parentFirstArtifact>
                        <parentFirstArtifact>org.jboss.logging:jboss-logging</parentFirstArtifact>
                        <parentFirstArtifact>jakarta.xml.bind:jakarta.xml.bind-api</parentFirstArtifact>
                    </parentFirstArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report-aggregate</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report-aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <!-- core models -->
        <!-- Converting the EPCIS Document XML <-> JSON -->
        <dependency>
            <groupId>io.openepcis</groupId>
            <artifactId>openepcis-document-converter</artifactId>
        </dependency>

        <!-- Converting the EPCIS Identifiers URN <-> WebURI -->
        <dependency>
            <groupId>io.openepcis</groupId>
            <artifactId>openepcis-digital-link-converter-core</artifactId>
        </dependency>

        <!-- EPC/CBV format-preference translation (URN <-> Digital Link / Web URI) -->
        <dependency>
            <groupId>io.openepcis</groupId>
            <artifactId>openepcis-model-format</artifactId>
        </dependency>

        <!-- Quarkus Service related dependency-->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-openapi</artifactId>
        </dependency>

        <!-- Add constants as dependencies -->
        <dependency>
            <groupId>io.openepcis</groupId>
            <artifactId>openepcis-test-resources</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.openepcis</groupId>
            <artifactId>converter-service-restassured</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- REST assured as dependencies for testing -->
        <dependency>
            <groupId>io.openepcis.quarkus</groupId>
            <artifactId>quarkus-document-converter</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
