<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>hu.icellmobilsoft.dookug</groupId>
    <artifactId>dookug-api</artifactId>
    <version>0.5.0</version>
  </parent>

  <artifactId>dookug-api-dto</artifactId>

    <dependencies>
        <dependency>
            <groupId>hu.icellmobilsoft.dookug</groupId>
            <artifactId>dookug-api-schema</artifactId>
        </dependency>

        <dependency>
            <groupId>hu.icellmobilsoft.coffee</groupId>
            <artifactId>coffee-dto-gen</artifactId>
        </dependency>
        <dependency>
            <groupId>hu.icellmobilsoft.coffee</groupId>
            <artifactId>coffee-module-configdoc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.microprofile.openapi</groupId>
            <artifactId>microprofile-openapi-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.14.0</version>
                <dependencies>
                    <!-- java 16+: https://github.com/highsource/maven-jaxb2-plugin/issues/201#issuecomment-808009784 -->
                    <dependency>
                        <groupId>org.glassfish.jaxb</groupId>
                        <artifactId>jaxb-runtime</artifactId>
                        <version>2.3.5</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>icell-super</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <!-- Nem generálja le újra a coffee dto-kat csak felhasználja -->
                            <episodes>
                                <episode>
                                    <groupId>hu.icellmobilsoft.coffee</groupId>
                                    <artifactId>coffee-dto-gen</artifactId>
                                </episode>
                            </episodes>
                            <strict>false</strict>
                            <!-- https://github.com/highsource/maven-jaxb2-plugin/wiki/Catalogs-in-Strict-Mode -->
                            <catalog>src/main/resources/xsd/hu/icellmobilsoft/dookug/super.catalog.xml</catalog>
                            <schemaIncludes>
                                <include>xsd/hu/icellmobilsoft/dookug/super.xsd</include>
                            </schemaIncludes>
                            <bindingIncludes>
                                <include>xsd/hu/icellmobilsoft/dookug/bindings.xjb</include>
                            </bindingIncludes>
                            <generateDirectory>${project.build.directory}/generated-sources/src/main/java
                            </generateDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <verbose>true</verbose>
                    <schemaDirectory>src/main/resources</schemaDirectory>
                    <args>
                        <arguments>-openapify</arguments>
                        <arguments>-Xfluent-api</arguments>
                        <arguments>-Xannotate</arguments>
                    </args>
                    <plugins>
                        <plugin>
                            <groupId>hu.icellmobilsoft.jaxb</groupId>
                            <artifactId>openapi-jaxb</artifactId>
                            <version>1.1.0</version>
                        </plugin>
                        <plugin>
                            <groupId>net.java.dev.jaxb2-commons</groupId>
                            <artifactId>jaxb-fluent-api</artifactId>
                            <version>2.1.8</version>
                        </plugin>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-basics-annotate</artifactId>
                            <version>1.0.4</version>
                        </plugin>
                        <plugin>
                            <groupId>com.fasterxml.jackson.core</groupId>
                            <artifactId>jackson-databind</artifactId>
                            <version>2.11.1</version>
                        </plugin>
                    </plugins>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
