<!--
  #%L
  %%
  Copyright (C) 2011 - 2017 BMW Car IT GmbH
  %%
  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.
  #L%
  -->
<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>io.joynr.java.messaging</groupId>
	<artifactId>channel-service</artifactId>
	<packaging>jar</packaging>

	<name>${project.groupId}:${project.artifactId}</name>

	<description>Defines RESTful service interfaces for messaging channel setup</description>

	<parent>
		<groupId>io.joynr.java</groupId>
		<artifactId>messaging</artifactId>
		<version>1.15.9</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<profiles>
		<profile>
			<!-- Since profile inheritance does not work (cf. [1]), the activation must
				be copied from the root POM and inserted here. [1] http://stackoverflow.com/questions/11407259/is-it-possible-to-extend-a-profile-in-a-child-module -->
			<id>carit-copyright</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<configuration>
							<excludes>
								<exclude>**/*.css</exclude>
								<exclude>**/*.js</exclude>
							</excludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<properties>
		<atmosphere-version>2.0.8</atmosphere-version>
	</properties>


	<dependencies>
		<dependency>
			<groupId>com.google.inject</groupId>
			<artifactId>guice</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.inject.extensions</groupId>
			<artifactId>guice-servlet</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-multipart</artifactId>
		</dependency>

		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-guice</artifactId>
		</dependency>

		<dependency>
			<groupId>io.joynr.java.messaging</groupId>
			<artifactId>messaging-common</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>io.joynr.java.messaging</groupId>
			<artifactId>servlet-common</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
		</dependency>

		<dependency>
			<groupId>org.atmosphere</groupId>
			<artifactId>atmosphere-jersey</artifactId>
			<version>${atmosphere-version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.atmosphere</groupId>
					<artifactId>atmosphere-ping</artifactId>
				</exclusion>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-classic</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.atmosphere</groupId>
			<artifactId>atmosphere-annotations</artifactId>
			<version>${atmosphere-version}</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>io.joynr.java.messaging</groupId>
			<artifactId>service-common</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>io.joynr.java.messaging</groupId>
			<artifactId>service-common</artifactId>
			<version>${project.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>

		<!--
			Workaround for Maven bug MNG-1378: Make dependencies of test-jars transitive
			Dependencies should come from service-common test-jar, but they aren't resolved
			transitively. Thus they are duplicated here.
		-->
		<dependency>
			<groupId>com.jayway.restassured</groupId>
			<artifactId>rest-assured</artifactId>
			<scope>test</scope>
			<exclusions>
				<!-- Exclude Groovy because of classpath issue -->
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy-xml</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy-json</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Need extra Groovy dependency because of classpath issues with REST Assured. -->
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-webapp</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- workaround end -->

	</dependencies>

	<build>
		<plugins>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<classpathDependencyExcludes>
						<!-- exclude code absent api -->
						<classpathDependencyExcludes>javax:javaee-api</classpathDependencyExcludes>
					</classpathDependencyExcludes>
				</configuration>
			</plugin>

		</plugins>

	</build>

</project>
