<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Simeon Malchev
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.i
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>org.vibur</groupId>
    <artifactId>vibur-dbcp</artifactId>
    <version>22.2</version>
    <packaging>bundle</packaging>

    <name>Vibur Database Connections Pool</name>
    <description>
        Concurrent, fast, and fully-featured JDBC connection pool, which provides a non-starvation guarantee for application
        threads, slow SQL queries detection and logging, and Hibernate integration, among other features.
    </description>
    <url>http://www.vibur.org</url>
    <inceptionYear>2013</inceptionYear>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!--<parent>-->
        <!--<groupId>org.sonatype.oss</groupId>-->
        <!--<artifactId>oss-parent</artifactId>-->
        <!--<version>7</version>-->
    <!--</parent>-->

    <scm>
        <connection>scm:git:https://github.com/vibur/vibur-dbcp.git/</connection>
        <developerConnection>scm:git:https://github.com/vibur/vibur-dbcp.git/</developerConnection>
        <url>https://github.com/vibur/vibur-dbcp/tree/master/</url>
      <tag>22.2</tag>
  </scm>

    <developers>
        <developer>
            <name>Simeon Malchev</name>
            <email>simeon.malchev@gmail.com</email>
            <id>simeonmalchev</id>
            <url>http://simeonmalchev.com</url>
            <timezone>+10</timezone>
            <roles>
                <role>owner</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <organization>
        <name>vibur.org</name>
        <url>http://www.vibur.org</url>
    </organization>

    <issueManagement>
        <system>https://github.com</system>
        <url>https://github.com/vibur/vibur-dbcp/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <java.version>1.7</java.version>
        <vibur.osgi.version>22.2</vibur.osgi.version>
        <slf4j.version>1.7.13</slf4j.version>
        <concurrentlinkedhashmap-lru.version>1.4.2</concurrentlinkedhashmap-lru.version>

        <junit.version>4.12</junit.version>
        <mockito-core.version>1.10.19</mockito-core.version>
        <hsqldb.version>2.3.3</hsqldb.version>

        <maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>
        <maven.bundle.plugin.version>3.3.0</maven.bundle.plugin.version>
        <maven.release.plugin.version>2.4.2</maven.release.plugin.version>
        <maven.javadoc.plugin.version>2.8</maven.javadoc.plugin.version>
        <maven.jar.plugin.version>2.4</maven.jar.plugin.version>
        <maven.source.plugin.version>2.1.2</maven.source.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.vibur</groupId>
            <artifactId>vibur-object-pool</artifactId>
            <version>22.2</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- ConcurrentLinkedHashMap dependency is used for JDBC statement caching only,
             that is disabled by default. If the client's application enables
             the statement caching, it needs to provide the below dependency. -->
        <dependency>
            <groupId>com.googlecode.concurrentlinkedhashmap</groupId>
            <artifactId>concurrentlinkedhashmap-lru</artifactId>
            <version>${concurrentlinkedhashmap-lru.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldb.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>sqltool</artifactId>
            <version>${hsqldb.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito-core.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${maven.bundle.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            org.vibur.dbcp,
                            org.vibur.dbcp.pool,
                            org.vibur.dbcp.stcache
                        </Export-Package>
                        <Import-Package>
                            javax.sql,
                            javax.naming,
                            javax.naming.spi,
                            javax.management,
                            org.slf4j;version="[${version;===;${slf4j.version}},${version;+;${slf4j.version}})",
                            com.googlecode.concurrentlinkedhashmap;version="[${version;===;${concurrentlinkedhashmap-lru.version}},${version;+;${concurrentlinkedhashmap-lru.version}})";resolution:=optional,
                            org.vibur.objectpool;version="[${version;==;${vibur.osgi.version}},${version;+;${vibur.osgi.version}})",
                            org.vibur.objectpool.util;version="[${version;==;${vibur.osgi.version}},${version;+;${vibur.osgi.version}})"
                        </Import-Package>
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.8.1</version>
					</dependency>
				</dependencies>
                <configuration>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <reportOutputDirectory>${project.basedir}</reportOutputDirectory>
                    <destDir>doc</destDir>
                </configuration>
                <executions>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>deploy-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
