<?xml version="1.0"?>
<!--
  ~ Copyright 2015 Hemant Padmanabhan
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ 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>

  <parent>
    <groupId>net.lizalab.util</groupId>
    <artifactId>jasypt-hibernate4-ext</artifactId>
    <version>1.0.0</version>
  </parent>

  <artifactId>jasypt-hibernate4-ext-42x</artifactId>
  <packaging>jar</packaging>

  <name>jasypt-hibernate4 Extensions for Hibernate 4.2.x</name>
  <description>Updates to the jasypt-hibernate4 artifact for the API changes in Hibernate 4.2.x.</description>

  <dependencies>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>4.2.17.Final</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-c3p0</artifactId>
      <version>4.2.17.Final</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  
  <build>
    <extensions>
      <!-- Database and driver for Integration Tests. -->
      <extension>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>2.3.2</version>
      </extension>
    </extensions>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
        <targetPath>META-INF</targetPath>
      </resource>
    </resources>
    <plugins>
  	  <plugin>
  	  	<groupId>org.apache.maven.plugins</groupId>
  	  	<artifactId>maven-javadoc-plugin</artifactId>
  	  	<version>2.10.1</version>
  	  	<configuration>
  	  	  <show>protected</show>
  	  	  <noqualifier>java.lang</noqualifier>
  	  	  <bottom>Copyright &copy; 2015 Hemant Padmanabhan. All Rights Reserved.</bottom>
  	  	  <links>
  	  	    <link>http://download.oracle.com/javase/7/docs/api/</link>
  	  	    <link>http://www.jasypt.org/api/jasypt/1.9.2/</link>
  	  	    <link>http://docs.jboss.org/hibernate/orm/4.2/javadocs/</link>
  	  	  </links>
  	  	</configuration>
  	  	<executions>
  	  	  <execution>
  	  	    <id>attach-javadocs</id>
  	  	    <goals>
  	  	      <goal>javadoc-no-fork</goal>
  	  	      <goal>jar</goal>
  	  	    </goals>
  	  	  </execution>
  	  	</executions>
  	  </plugin>
  	  <!-- Setup the database for Integration tests. -->
  	  <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sql-maven-plugin</artifactId>
        <version>1.5</version>
        <configuration>
          <driver>org.hsqldb.jdbcDriver</driver>
          <url>jdbc:hsqldb:file:target/data/test42xdb;shutdown=true</url>
          <username>sa</username>
          <password />
        </configuration>
        <executions>
          <execution>
            <id>create-test-user</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <autocommit>true</autocommit>
              <srcFiles>
                <srcFile>src/test/resources/test-user.sql</srcFile>
              </srcFiles>
            </configuration>
          </execution>
        </executions>
  	  </plugin>
    </plugins>
  </build>

</project>
