<?xml version="1.0" encoding="ISO-8859-1"?>
<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.geoserver.community</groupId>
		<artifactId>gs-jms-cluster-container</artifactId>
		<version>2.15-SNAPSHOT-C105</version>
	</parent>

	<groupId>org.geoserver.community</groupId>
	<artifactId>activemqBroker</artifactId>
	<version>2.15-SNAPSHOT-C105</version>
	<packaging>war</packaging>

	<name>ActiveMQ</name>

	<properties>
		<postgres.version>8.3-603.jdbc4</postgres.version>
		<spring.version>3.1.4.RELEASE</spring.version>
	</properties>


	<build>
		<plugins>
			<!-- eclipse ide integration -->
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.8</version>
				<configuration>
					<contextPath>activemq</contextPath>
					<connectors>
						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
							<port>8081</port>
							<maxIdleTime>10000</maxIdleTime>
						</connector>
					</connectors>
					<contextPath>activemq</contextPath>
					<webAppSourceDirectory>${project.build.directory}/activemq</webAppSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
						</manifest>
					</archive>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<profiles>	
		<!--profile>
			<id>oracle</id>
			<dependencies>
				<dependency>
					<groupId>org.apache.openejb</groupId>
					<artifactId>commons-dbcp-all</artifactId>
					<version>1.3</version>
				</dependency>
				<dependency><groupId>com.oracle</groupId>
					<artifactId>ojdbc14</artifactId>
					<version>10.2.0.4.0</version>
				</dependency>
			</dependencies>
		</profile-->
		<profile>
			<id>postgres</id>
			<activation>
				<property>
					<name>all</name>
					<value>true</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>postgresql</groupId>
					<artifactId>postgresql</artifactId>
        			<version>${postgres.version}</version>
				</dependency>
			</dependencies>
		</profile>
	</profiles>
	
	<dependencyManagement>
		<dependencies>
			<!-- Needed to solve NamespaceHandler class org.apache.xbean.spring.context.v2.XBeanNamespaceHandler 
				for namespace [http://activemq.apache.org/schema/core] not found ClassNotFoundException: 
				org.apache.xbean.spring.context.v2.XBeanNamespaceHandler<br> ref: http://codebrane.com/blog/?p=823 -->
			<dependency>
				<groupId>org.apache.xbean</groupId>
				<artifactId>xbean-spring</artifactId>
				<version>3.7</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<!-- ============================== -->
			<!-- log4j -->
			<!-- ============================== -->
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>1.2.14</version>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-expression</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-beans</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-web</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<!-- added to solve: problem with class file or dependent class; nested 
				exception is java.lang.NoClassDefFoundError: org/springframework/context/SmartLifecycle -->
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${spring.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-all</artifactId>
				<version>5.9.0</version>
				<!-- exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> 
					</exclusion> </exclusions -->
			</dependency>

			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcprov-jdk15on</artifactId>
				<version>1.60</version>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<dependencies>

		<!-- Needed to solve NamespaceHandler class org.apache.xbean.spring.context.v2.XBeanNamespaceHandler 
			for namespace [http://activemq.apache.org/schema/core] not found ClassNotFoundException: 
			org.apache.xbean.spring.context.v2.XBeanNamespaceHandler<br> ref: http://codebrane.com/blog/?p=823 -->
		<dependency>
			<groupId>org.apache.xbean</groupId>
			<artifactId>xbean-spring</artifactId>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- ============================== -->
		<!-- log4j -->
		<!-- ============================== -->
<!-- 		<dependency> -->
<!-- 			<groupId>log4j</groupId> -->
<!-- 			<artifactId>log4j</artifactId> -->
<!-- 		</dependency> -->
		<!-- ============================== -->
		<!-- slf4j -->
		<!-- ============================== -->
<!-- 		<dependency> -->
<!-- 			<groupId>org.slf4j</groupId> -->
<!-- 			<artifactId>slf4j-api</artifactId> -->
<!-- 		</dependency> -->
<!-- 		<dependency> -->
<!-- 			<groupId>org.slf4j</groupId> -->
<!-- 			<artifactId>slf4j-log4j12</artifactId> -->
<!-- 		</dependency> -->

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-expression</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
		</dependency>
		<!-- added to solve: problem with class file or dependent class; nested 
			exception is java.lang.NoClassDefFoundError: org/springframework/context/SmartLifecycle -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-all</artifactId>
		</dependency>
		<!-- TESTS -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jndi</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-plus</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

</project>
