<?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.distribution</groupId>
		<artifactId>sensinact-distribution-generator</artifactId>
		<version>2.0-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<artifactId>profile</artifactId>
	<packaging>pom</packaging>

	<name>sensiNact IoT Gateway - sensiNact Runtime (bridge profile generator)</name>

	<properties>
		<excludeArtifactId>
			slf4j-api,
			org.osgi.core,
			osgi.cmpn,
			osgi.annotation,
			sensinact-generic,
			sensinact-core,
			sensinact-utils,
			sensinact-condperm,
			sensinact-datastore-api,
			json,
			asm-all,
			biz.aQute.bnd.annotation
		</excludeArtifactId>
		<excludeGroupId></excludeGroupId> <!-- org.apache.felix, -->
		<excludeTransitive>true</excludeTransitive>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.distribution</groupId>
			<artifactId>sensinact-distribution-template</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.distribution</groupId>
			<artifactId>sensinact-distribution-template-with-security</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.distribution</groupId>
			<artifactId>sensinact-distribution-template-with-openid-security</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
	                <artifactId>maven-dependency-plugin</artifactId>
	                <executions>
	                    <execution>
	                        <id>copy-dependencies</id>
	                        <phase>prepare-package</phase>
	                        <goals>
	                            <goal>copy-dependencies</goal>
	                        </goals>
	                        <configuration>
	                            <outputDirectory>${project.build.directory}/sensinact/load/${project.artifactId}</outputDirectory>
	                            <excludeArtifactIds>${excludeArtifactId}</excludeArtifactIds>
	                            <excludeGroupIds>${excludeGroupId}</excludeGroupIds>
	                            <excludeTransitive>${excludeTransitive}</excludeTransitive>
	                            <excludeTypes>pom</excludeTypes>
	                            <includeScope>runtime</includeScope>
	                        </configuration>
	                    </execution>     
	                </executions>
	            </plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-resources-this-build</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/../../../target/sensinact</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.directory}/sensinact/</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-resources-this-build-with-security</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/../../../target/sensinact-with-security</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.directory}/sensinact/</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-resources-this-build-with-openid-security</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/../../../target/sensinact-with-openid-security</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.directory}/sensinact/</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>			
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <inherited>false</inherited>
            </plugin>
		</plugins>
	</build>

	<modules>
		<module>android-imu-profile</module>
		<module>application-profile</module>
		<module>free-sms</module>
		<module>kodi-profile</module>
		<module>mqtt-sb-profile</module>
		<module>mqtt-nb-profile</module>
		<module>mqtt-server</module>
		<module>openhab-profile</module>
		<module>openweather-profile</module>
		<module>onem2m</module>
		<module>onem2m-mqttbinding</module>
		<module>rest-profile</module>
		<!--<module>jsonpath-profile</module>-->
		<module>simulation-profile</module>
		<module>http-storage-agent-profile</module>
		<module>influxdb-storage-agent-profile</module>
		<module>historic-profile</module>
		<module>swagger-profile</module>
		<module>sensinact-remote</module>
		<module>sensinact-datastore</module>
		<module>ldapfilter</module>
		<module>geojsonfilter</module>
		<module>attributesfilter</module>
		<module>http-client</module>
		<!--<module>oauth2-profile</module>-->
		<module>ttn-profile</module>
	</modules>
</project>