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

	<modelVersion>4.0.0</modelVersion>
	
	<parent>
		<groupId>org.jarbframework</groupId>
		<artifactId>jarb-parent</artifactId>
		<version>2.0.3</version>
	</parent>
	
	<artifactId>jarb-sample</artifactId>
	<packaging>war</packaging>
	<description>Sample application that demonstrates all modules.</description>

	<dependencies>   
		<!-- Components being demonstrated -->
        <dependency>
            <groupId>org.jarbframework</groupId>
            <artifactId>jarb-migrations</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jarbframework</groupId>
            <artifactId>jarb-constraints</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jarbframework</groupId>
            <artifactId>jarb-populator-excel</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Web application -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
        
        <!-- Marshalling -->
		<dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${spring.version}</version>
		</dependency>
		<dependency>
		    <groupId>org.codehaus.jackson</groupId>
		    <artifactId>jackson-jaxrs</artifactId>
		    <version>1.9.12</version>
		</dependency>

        <!-- Data access -->
        <dependency>
		    <groupId>org.springframework.data</groupId>
		    <artifactId>spring-data-jpa</artifactId>
		    <version>1.3.0.RELEASE</version>
		    <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
		    </exclusions>
		</dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.13.0.GA</version>
            <scope>runtime</scope>
        </dependency>
        
        <!-- Validation -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.3.1.Final</version>
       </dependency>
	</dependencies>
	
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<archive>
						<forced>false</forced>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Build-Time>${timestamp}</Build-Time>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile>
			<id>tomcat</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<tomcat.port>8080</tomcat.port>
				<spring.profiles>default,demo</spring.profiles>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.tomcat.maven</groupId>
						<artifactId>tomcat7-maven-plugin</artifactId>
						<version>2.2</version>
						<configuration>
							<charset>${project.reporting.outputEncoding}</charset>
							<port>${tomcat.port}</port>
							<path>/</path>
							<useTestClasspath>true</useTestClasspath>
							<systemProperties>
								<org.apache.el.parser.SKIP_IDENTIFIER_CHECK>true</org.apache.el.parser.SKIP_IDENTIFIER_CHECK>
								<spring.profiles.active>${spring.profiles}</spring.profiles.active>
							</systemProperties>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
