<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.github.openfeign.querydsl</groupId>
    <artifactId>querydsl-root</artifactId>
    <version>7.1</version>
  </parent>

  <artifactId>querydsl-libraries</artifactId>
  <packaging>pom</packaging>
  <name>Querydsl - Libraries</name>

  <modules>
    <module>querydsl-core</module>
    <module>querydsl-spatial</module>

    <module>querydsl-collections</module>
    <module>querydsl-guava</module>

    <!-- SQL -->
    <module>querydsl-sql</module>
    <module>querydsl-sql-spatial</module>
    <module>querydsl-sql-spring</module>
    <module>querydsl-sql-json</module>
    <!-- Reactive SQL -->
    <module>querydsl-r2dbc</module>

    <!-- JPA -->
    <module>querydsl-jpa</module>
    <module>querydsl-jpa-spring</module>
    <!-- NoSQL -->
    <module>querydsl-mongodb</module>

    <!-- Languages -->
    <module>querydsl-scala</module>
    <module>querydsl-kotlin</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>jakarta.persistence</groupId>
        <artifactId>jakarta.persistence-api</artifactId>
        <version>${jpa.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>${jakarta.annotation.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.validation</groupId>
        <artifactId>jakarta.validation-api</artifactId>
        <version>3.1.1</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.activation</groupId>
        <artifactId>jakarta.activation-api</artifactId>
        <version>2.1.4</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.inject</groupId>
        <artifactId>jakarta.inject-api</artifactId>
        <version>2.0.1.MR</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <!-- Jetbrains Annotations should be in provided scope -->
                    <exclude>org.jetbrains:annotations:*:*:compile</exclude>
                    <!-- JSR-305 annotations should not be used, instead use Jetbrains Annotations -->
                    <exclude>com.google.code.findbugs:jsr305:*:*:compile</exclude>
                    <!-- The following API's should be optionally provided and declare provided scope -->
                    <exclude>org.hibernate:hibernate-core:*:*:compile</exclude>
                    <exclude>org.hibernate:hibernate-envers:*:*:compile</exclude>
                    <exclude>org.hibernate.validator:hibernate-validator:*:*:compile</exclude>
                    <exclude>org.eclipse.persistence:eclipselink:*:*:compile</exclude>
                    <exclude>dev.morphia:core:*:*:compile</exclude>
                    <exclude>org.joda:joda-money:*:*:compile</exclude>
                    <exclude>org.batoo.jpa:batoo-jpa:*:*:compile</exclude>
                    <exclude>jakarta.annotation:jakarta.annotation-api:*:*:compile</exclude>
                    <exclude>jakarta.activation:jakarta.activation-api:*:*:compile</exclude>
                    <exclude>jakarta.inject:jakarta.inject-api:*:*:compile</exclude>
                    <exclude>jakarta.persistence:jakarta.persistence-api:*:*:compile</exclude>
                    <exclude>jakarta.transaction:jakarta.transaction-api:*:*:compile</exclude>
                    <exclude>jakarta.validation:jakarta.validation-api:*:*:compile</exclude>
                    <exclude>jakarta.xml.bind:jakarta.xml.bind-api:*:*:compile</exclude>
                    <!-- Ban any API's that were moved to jakarta -->
                    <exclude>javax.*:*:*:*:*</exclude>
                    <!-- Ban libraries that support was dropped -->
                    <exclude>org.datanucleus:javax.jdo:*:*:*</exclude>
                    <exclude>org.springframework.roo:org.springframework.roo.annotations:*:*:compile</exclude>
                    <!-- The following database drivers should be in test scope -->
                    <exclude>org.hsqldb:hsqldb:*:*:compile</exclude>
                    <exclude>com.h2database:h2:*:*:compile</exclude>
                    <exclude>org.apche.derby:derby:*:*:compile</exclude>
                    <exclude>mysql:mysql-connector-java:*:*:compile</exclude>
                    <exclude>com.microsoft.sqlserver:mssql-jdbc:*:*:compile</exclude>
                    <exclude>com.oracle:ojdbc8:*:*:compile</exclude>
                    <exclude>org.postgresql:postgresql:*:*:compile</exclude>
                    <exclude>cubrid:cubrid-jdbc:*:*:compile</exclude>
                    <exclude>org.firebirdsql.jdbc:jaybird:*:*:compile</exclude>
                    <exclude>org.xerial:sqlite-jdbc:*:*:compile</exclude>
                    <!-- hibernate-entitymanager is a legacy artefact and should not be used anymore -->
                    <exclude>org.hibernate:hibernate-entitymanager</exclude>
                    <!-- We favor JUL over Slf4j -->
                    <exclude>org.slf4j:slf4j-api:*:*:compile</exclude>
                    <exclude>org.slf4j:slf4j-log4j12:*:*:compile</exclude>
                    <exclude>junit:junit:*:*:*</exclude>
                    <exclude>cglib:cglib:*:*:*</exclude>
                  </excludes>
                  <searchTransitive>false</searchTransitive>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>cmp</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
