<?xml version="1.0" encoding="UTF-8"?>
<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">

	<parent>
		<groupId>at.crea-doo.homer</groupId>
		<artifactId>connector</artifactId>
		<version>1.0.11</version>
		<relativePath>../</relativePath>
	</parent>

	<modelVersion>4.0.0</modelVersion>

	<artifactId>connector.ifttt.maker</artifactId>
	<packaging>bundle</packaging>
	<name>HOMER - Connector - IFTTT Maker Channel</name>
	<description />

	<profiles>
		<profile>
			<id>test</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>runtests</id>
								<phase>test</phase>
								<goals>
									<goal>java</goal>
								</goals>
								<configuration>
									<classpathScope>test</classpathScope>
									<includeProjectDependencies>true</includeProjectDependencies>
									<includePluginDependencies>true</includePluginDependencies>
									<mainClass>at.creadoo.homer.connector.ifttt.maker.test.Test</mainClass>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
	<dependencies>
		<dependency>
			<groupId>at.ac.ait.hbs.homer</groupId>
			<artifactId>at.ac.ait.hbs.homer.core.common</artifactId>
		</dependency>

		<!-- HTTP -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.5.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>4.4.6</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.2</version>
		</dependency>
		<!-- /HTTP -->

		<!-- JSON -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.1</version>
		</dependency>
		<!-- /JSON -->
		
		<!-- OSGi -->
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- /OSGi -->

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-artifact</id>
						<phase>package</phase>
						<inherited>false</inherited>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${project.build.outputDirectory}/config.cfg</file>
									<type>cfg</type>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Include-Resource>
							src/main/resources
						</Include-Resource>
						<Import-Package>
							!javax.servlet,
							!org.apache.log,
							*
						</Import-Package>
						<Export-Package />
						<Embed-Dependency>
							httpclient;scope=runtime|compile;inline=false,
							httpcore;scope=runtime|compile;inline=false,
							commons-logging;scope=runtime|compile;inline=false,
							commons-codec;scope=compile|runtime;inline=false,
							gson;scope=compile|runtime;inline=false
						</Embed-Dependency>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
