<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2020 Kentyou.
  ~ All rights reserved. This program and the accompanying materials
  ~ are made available under the terms of the Eclipse Public License v1.0
  ~ which accompanies this distribution, and is available at
  ~ http://www.eclipse.org/legal/epl-v10.html
  ~
  ~ Contributors:
*    Kentyou - initial API and implementation
  -->

<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>org.eclipse.sensinact.gateway</groupId>
		<artifactId>sensinact-security</artifactId>
		<version>2.0-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<artifactId>sensinact-security-test</artifactId>
	<packaging>jar</packaging>

	<name>sensiNact IoT Gateway - Security Core Test</name>

	<dependencies>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-core</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-signature-validator-api</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-signature-validator-secure</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-utils</artifactId>
			<scope>provided</scope>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-common</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-datastore-api</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>		
		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-databind</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.http.jetty</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-security-core</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.nthbnd</groupId>
			<artifactId>http-tools</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.protocol</groupId>
			<artifactId>http</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.skyscreamer</groupId>
			<artifactId>jsonassert</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway</groupId>
			<artifactId>sensinact-sqlite-connector</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.simulated.devices</groupId>
			<artifactId>light</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.simulated.devices</groupId>
			<artifactId>slider</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.simulated.devices</groupId>
			<artifactId>fan</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.simulated.devices</groupId>
			<artifactId>button</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>	
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>bnd-process-tests</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>bnd-process-tests</goal>
						</goals>
						<configuration>
							<bndfile>tests.bnd</bndfile>
							<artifactFragment>false</artifactFragment>
							<testCases>junit5</testCases>
							<includeClassesDir>false</includeClassesDir>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<id>test-jar</id>
						<phase>package</phase>
						<goals>
							<goal>test-jar</goal>
						</goals>
						<configuration>
							<archive>
								<manifestFile>${project.build.testOutputDirectory}/META-INF/MANIFEST.MF</manifestFile>
							</archive>
							<excludes>
								<exclude>**/mail/**</exclude>
							</excludes>
							
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-resolver-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-testing-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>