<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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.github.ferstl</groupId>
  <artifactId>spring-jdbc-oracle-parent</artifactId>
  <name>${project.artifactId}</name>
  <packaging>pom</packaging>
  <version>2.0.0</version>

  <description>
    A variant of Spring's JdbcTemplate that uses Oracle Update Batching. If Spring's classic JdbcTemplate is used in
    combination with an Oracle DB, the `batchUpdate()` methods won't return the number of affected rows. Instead, these
    methods do always return an array containing -2 (`Statement#SUCCESS_NO_INFO`) in each element. In order to get the
    number of affected rows during a batch INSERT/UPDATE/DELETE, it is required to use
    [Oracle Update Batching](http://docs.oracle.com/cd/B28359_01/java.111/b31224/oraperf.htm#autoId2).
  </description>

  <url>https://github.com/ferstl/spring-jdbc-oracle</url>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>ferstl</id>
      <name>Stefan Ferstl</name>
      <email>st.ferstl@gmail.com</email>
      <url>https://github.com/ferstl</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:ferstl/spring-jdbc-oracle.git</connection>
    <developerConnection>scm:git:git@github.com:ferstl/spring-jdbc-oracle.git</developerConnection>
    <url>${project.url}</url>
    <tag>spring-jdbc-oracle-2.0.0</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>${distribution.release.id}</id>
      <url>${distribution.release.url}</url>
    </repository>
    <snapshotRepository>
      <id>${distribution.snapshot.id}</id>
      <url>${distribution.snapshot.url}</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <!-- Plugin versions -->
    <license-maven-plugin.version>3.0</license-maven-plugin.version>
    <maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
    <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>

    <!-- Dependency versions -->
    <springframework.version>5.0.7.RELEASE</springframework.version>
    <junit.version>4.12</junit.version>
    <hamcrest.version>2.0.0.0</hamcrest.version>
    <mockito.version>2.13.0</mockito.version>

    <!-- Build properties -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <main.basedir>${project.basedir}</main.basedir>
  </properties>

  <modules>
    <module>spring-jdbc-oracle</module>
    <module>spring-jdbc-oracle-integrationtests</module>
    <module>spring-jdbc-oracle-ojdbc</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${springframework.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${springframework.version}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>java-hamcrest</artifactId>
        <version>${hamcrest.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${springframework.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${license-maven-plugin.version}</version>
          <configuration>
            <header>${main.basedir}/etc/header.txt</header>
            <strictCheck>true</strictCheck>
            <mapping>
              <java>SLASHSTAR_STYLE</java>
            </mapping>
            <includes>
              <include>src/main/**</include>
              <include>src/test/java/**</include>
            </includes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <show>private</show>
            <links>
              <link>https://docs.spring.io/spring-framework/docs/5.0.x/javadoc-api/</link>
            </links>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>-Pdeploy-to-sonatype-oss</arguments>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

  </build>

  <profiles>
    <profile>
      <id>deploy-to-sonatype-oss</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
