<?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>packaging</artifactId>
	<packaging>pom</packaging>

	<name>sensiNact IoT Gateway - sensiNact Packaging</name>

	<dependencies>
		<dependency>
			<groupId>org.eclipse.sensinact.gateway.distribution</groupId>
			<artifactId>profile</artifactId>
			<version>${project.version}</version>
			<type>pom</type>
		</dependency>
	</dependencies>

	<properties>
		<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<inherited>false</inherited>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>						
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>distribution.xml</descriptor>
							</descriptors>
							<finalName>sensiNact-gateway-${project.version}-${maven.build.timestamp}</finalName>
						</configuration>
					</execution>
					<execution>
						<id>make-assembly-with-security</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>						
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>distribution-with-security.xml</descriptor>
							</descriptors>
							<finalName>sensiNact-gateway-with-security-${project.version}-${maven.build.timestamp}</finalName>
						</configuration>
					</execution>
					<execution>
						<id>make-assembly-with-openid-security</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>						
						<configuration>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>distribution-with-openid-security.xml</descriptor>
							</descriptors>
							<finalName>sensiNact-gateway-with-openid-security-${project.version}-${maven.build.timestamp}</finalName>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>