<?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>blaze-persistence-integration-spring-data-parent</artifactId>
        <groupId>com.blazebit</groupId>
        <version>1.6.5</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <name>Blazebit Persistence Integration Spring-Data 2.4</name>
    <artifactId>blaze-persistence-integration-spring-data-2.4</artifactId>

    <properties>
        <module.name>com.blazebit.persistence.integration.spring.data.impl</module.name>
        <spring.activeProfiles />
        <test.argLine />
        <version.spring>${version.spring-data-2.4-spring}</version.spring>
        <rxjava-reactive-streams>1.2.1</rxjava-reactive-streams>
        <kotlin-coroutines>1.3.6</kotlin-coroutines>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>${version.spring}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-coroutines-bom</artifactId>
                <version>${kotlin-coroutines}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
            <version>${version.spring-data-2.4}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.reactivex</groupId>
            <artifactId>rxjava-reactive-streams</artifactId>
            <version>${rxjava-reactive-streams}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-reactive</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.infradna.tool</groupId>
            <artifactId>bridge-method-annotation</artifactId>
            <version>${version.bridge-injector}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jenkins-ci</groupId>
                    <artifactId>annotation-indexer</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- We need a newer version to be compatible with JDK9+ -->
        <dependency>
            <groupId>org.jenkins-ci</groupId>
            <artifactId>annotation-indexer</artifactId>
            <version>${version.bridge-injector-indexer}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-entity-view-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-jpa-criteria-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-jpa-criteria-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>1.0.0.Final</version>
            <scope>provided</scope>
        </dependency>

        <!-- At runtime the user is going to need all dependencies anyway, so let's just give them through transitively -->
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-integration-spring-data-base</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-integration-entity-view-spring</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-core-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.blazebit</groupId>
            <artifactId>blaze-persistence-entity-view-impl</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Test Dependencies -->

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.moditect</groupId>
                <artifactId>moditect-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-module-infos</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                            <module>
                                <moduleInfoSource>
                                    module ${module.name} {
                                        requires transitive com.blazebit.persistence.integration.spring.data;
                                        exports com.blazebit.persistence.spring.data.impl.query;
                                        exports com.blazebit.persistence.spring.data.impl.repository;
                                    }
                                </moduleInfoSource>
                            </module>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-resource</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-resource</goal>
                        </goals>
                        <configuration>
                            <resources>
                                <resource>
                                    <directory>target/generated/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <executions>
                    <execution>
                        <id>process</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <!-- source output directory -->
                            <outputDirectory>target/generated/resources</outputDirectory>
                            <processors>
                                <processor>org.jvnet.hudson.annotation_indexer.AnnotationProcessorImpl</processor>
                            </processors>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.infradna.tool</groupId>
                        <artifactId>bridge-method-annotation</artifactId>
                        <version>${version.bridge-injector}</version>
                    </dependency>
                    <!-- We need a newer version to be compatible with JDK9+ -->
                    <dependency>
                        <groupId>org.jenkins-ci</groupId>
                        <artifactId>annotation-indexer</artifactId>
                        <version>${version.bridge-injector-indexer}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.infradna.tool</groupId>
                <artifactId>bridge-method-injector</artifactId>
                <version>${version.bridge-injector}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <!-- Replace the old ASM version by the new one to support JDK9+ -->
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-debug-all</artifactId>
                        <version>1.6.5</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>${version.bridge-injector-asm}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>${version.bridge-injector-asm}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>