<?xml version="1.0"?>
<!--
  ~ Copyright (C) 2010-2022 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  -->


<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>
        <artifactId>prism</artifactId>
        <groupId>com.evolveum.prism</groupId>
        <version>4.11-M1</version>
    </parent>

    <artifactId>prism-api</artifactId>

    <name>midPoint Infrastructure - prism-api</name>

    <dependencies>
        <dependency>
            <groupId>com.evolveum.commons</groupId>
            <artifactId>util</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.activation</groupId>
            <artifactId>jakarta.activation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>xsom</artifactId>
        </dependency>

        <!-- TEST -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.evolveum.commons</groupId>
            <artifactId>test-ng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>5.6</version>
            <scope>test</scope>
            <exclusions>
                <!-- Not necessary and uses commons-logging - we don't want that. -->
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.evolveum.axiom</groupId>
            <artifactId>axiom</artifactId>
            <version>4.11-M1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.evolveum.commons</groupId>
            <artifactId>concepts</artifactId>
            <version>4.11-M1</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <!-- We don't need the test code specific to prism-api module in this JAR. -->
                                <include>com/evolveum/midpoint/prism/testing/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Code generator may be used in Prism in the "pure" form without any prism-specific plugins.
             This creates the classes for basic (almost-primitive) data types such as PolyStringType.
             But ... the JAXB-generated classes are not that useful. They may reflect the schema well, but
             there are glitches. E.g. the JAXB classes generated for query namespace are completely useless.
             The default JAXB-generated class for PolyStringType is also useless. Therefore the classes that
             were generated from the schema are copied to the "main" source tree in the form that suits us
             better than just blindly following the schema. Therefore the following plugin is commented out.
             It may be used in case that the schemas change and we need to re-generate and re-tweak them.
             But the plugin should be disabled during normal build. -->
            <!-- <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <verbose>true</verbose>
                            <catalog>src/main/resources/META-INF/catalog.xml</catalog>
                            <extension>true</extension>
                            <schemaDirectory>src/main/resources/xml/ns/public</schemaDirectory>
                            <generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>  -->
            <!--
             Following plugin generates the JAXB classes for prism tests.
             We can't really test full JAXB capabilities here as we get the proper JAXB plugin code
             only after Prism is compiled.
             This plugin is not really needed during normal build.
             The classes that we need are hard-copied into the prism test source tree.
             Disabling this plugin speeds up the compilation. -->
            <!--
           <plugin>
               <groupId>org.jvnet.jaxb2.maven2</groupId>
               <artifactId>maven-jaxb2-plugin</artifactId>
               <version>0.8.0</version>
               <executions>
                   <execution>
                       <goals>
                           <goal>generate</goal>
                       </goals>
                       <configuration>
                           <verbose>true</verbose>
                           <catalog>src/main/resources/META-INF/catalog.xml</catalog>
                           <extension>true</extension>
                           <schemaDirectory>src/main/resources/xml/ns/test</schemaDirectory>
                           <generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
                       </configuration>
                   </execution>
               </executions>
           </plugin>  -->
        </plugins>
    </build>
</project>
