<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>

  <groupId>com.oracle.database.jdbc</groupId>
  <artifactId>ojdbc-extensions</artifactId>
  <version>1.0.6</version>
  <packaging>pom</packaging>

  <name>Extensions for the Oracle JDBC Driver</name>
  <description>Oracle JDBC Extensions include providers for multiple resources</description>
  <url>https://github.com/oracle/ojdbc-extensions</url>
  <licenses>
    <license>
      <name>The Universal Permissive License (UPL), Version 1.0</name>
      <url>https://oss.oracle.com/licenses/upl/</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <organization>Oracle America, Inc.</organization>
      <organizationUrl>http://www.oracle.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/oracle/ojdbc-extensions</url>
    <connection>scm:git:https://github.com/oracle/ojdbc-extensions</connection>
    <developerConnection>scm:git:https://github.com/oracle/ojdbc-extensions</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <jdbc.version>23.8.0.25.04</jdbc.version>
    <junit.version>5.9.0</junit.version>
    <mockito.version>4.11.0</mockito.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <profiles>
    <!--
      This profile configures the "release" option for javac, which was added
      in JDK 9. See https://github.com/oracle/ojdbc-extensions/pull/46
    -->
    <profile>
      <id>javac-release</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <properties>
        <maven.compiler.release>8</maven.compiler.release>
      </properties>
    </profile>
  </profiles>

  <modules>
    <module>ojdbc-provider-common</module>
    <module>ojdbc-provider-azure</module>
    <module>ojdbc-provider-oci</module>
    <module>ojdbc-provider-samples</module>
    <module>ojdbc-provider-opentelemetry</module>
    <module>ojdbc-provider-aws</module>
    <module>ojdbc-provider-gcp</module>
    <module>ojdbc-provider-jackson-oson</module>
    <module>ojdbc-provider-hashicorp</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc-provider-common</artifactId>
        <version>1.0.6</version>
      </dependency>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>${jdbc.version}</version>
      </dependency>
      <dependency>
        <groupId>com.oracle.database.security</groupId>
        <artifactId>oraclepki</artifactId>
        <version>${jdbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc-provider-common</artifactId>
        <version>1.0.6</version>
        <classifier>tests</classifier>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <attach>true</attach>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <tags>
            <tag>
              <name>apiNote</name>
              <placement>a</placement>
              <head>API Note:</head>
            </tag>
            <tag>
              <name>implSpec</name>
              <placement>a</placement>
              <head>Implementation Requirements:</head>
            </tag>
            <tag>
              <name>implNote</name>
              <placement>a</placement>
              <head>Implementation Note:</head>
            </tag>
          </tags>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <attach>true</attach>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <!-- Add THIRD_PARTY_LICENSES.txt from the basedir of each module -->
      <resource>
        <directory>${project.basedir}</directory>
        <includes>
          <include>THIRD_PARTY_LICENSES.txt</include>
        </includes>
        <targetPath>META-INF</targetPath>
      </resource>
      <!-- Add LICENSE.txt from the root directory -->
      <resource>
        <directory>${project.basedir}/..</directory>
        <includes>
          <include>LICENSE.txt</include>
        </includes>
        <targetPath>META-INF</targetPath>
      </resource>
      <!-- Add META-INF/services -->
      <resource>
        <directory>${project.basedir}/src/main/resources/META-INF/services/</directory>
        <includes>
          <include>oracle.jdbc.spi.*</include>
        </includes>
        <targetPath>META-INF/services/</targetPath>
      </resource>
    </resources>
  </build>
</project>
