<?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">
	<parent>
		<groupId>net.sf.r4h</groupId>
		<artifactId>repository4hibernate</artifactId>
		<version>4.1.8.Final</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<artifactId>repository4hibernate-api</artifactId>
	<name>${project.artifactId}</name>
	<description>Provides HibernateRepostiry class that allows to build most of CRUD operations a typical UI application needs with 1 line of code.</description>
	<properties>
		<spring.version>3.1.3.RELEASE</spring.version>
		<maven-pmd-plugin.configLocation>${project.basedir}/../pmd.xml</maven-pmd-plugin.configLocation>
	</properties>
	<build>
		<filters>
			<filter>src/test/filters/database-h2.properties</filter>
		</filters>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>true</filtering>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.3.7</version>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- won't work without previous plugin enabled -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<forkMode>always</forkMode>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.felix
										</groupId>
										<artifactId>
											maven-bundle-plugin
										</artifactId>
										<versionRange>
											[2.3.5,)
										</versionRange>
										<goals>
											<goal>manifest</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>repository4hibernate-shared</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>[4.1.8.Final,4.2.0.Final)</version>
			<exclusions>
				<exclusion>
					<artifactId>jta</artifactId>
					<groupId>javax.transaction</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.4</version>
			<scope>test</scope>
		</dependency>
            
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.4</version>
			<scope>test</scope>
		</dependency>
	
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>c3p0</groupId>
			<artifactId>c3p0</artifactId>
			<version>0.9.1.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.geronimo.specs</groupId>
			<artifactId>geronimo-jta_1.1_spec</artifactId>
			<version>1.1.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
			<version>2.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.3.163</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>9.1-901.jdbc4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>1.8.0.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.12</version>
			<scope>test</scope><!-- needed for spring exception translation configured without using @Repository annotation -->
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>test-on-postgresql</id>
			<build>
				<filters>
					<filter>src/test/filters/database-postgresql.properties</filter>
				</filters>
			</build>
			<dependencies>
				<dependency>
					<groupId>postgresql</groupId>
					<artifactId>postgresql</artifactId>
					<version>9.0-801.jdbc4</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<!-- this profile won't work because of another hibernate bug hibernate.hbm2ddl.auto -->
			<id>test-on-hsql</id>
			<build>
				<filters>
					<filter>src/test/filters/database-hsql.properties</filter>
				</filters>
				<testResources>
					<testResource>
						<directory>src/test/resources</directory>
						<filtering>true</filtering>
					</testResource>
				</testResources>
			</build>
			<dependencies>
				<dependency>
					<groupId>hsqldb</groupId>
					<artifactId>hsqldb</artifactId>
					<version>1.8.0.10</version>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>test-on-h2</id>
			<build>
				<filters>
					<filter>src/test/filters/database-h2.properties</filter>
				</filters>
				<testResources>
					<testResource>
						<directory>src/test/resources</directory>
						<filtering>true</filtering>
					</testResource>
				</testResources>
			</build>
			<dependencies>
				<dependency>
					<groupId>com.h2database</groupId>
					<artifactId>h2</artifactId>
					<version>1.3.163</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
		</profile>
	</profiles>
</project>
