<?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/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>io.rhiot</groupId>
		<version>0.1.4</version>
		<artifactId>rhiot-datastream</artifactId>
		<relativePath>..</relativePath>
	</parent>
	<name>Rhiot :: DataStream :: Camel Components</name>
	<artifactId>rhiot-datastream-components</artifactId>
	<packaging>pom</packaging>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<modules>
		<module>camel-coap</module>
		<module>camel-gps-bu353</module>
		<module>camel-device-io</module>
		<module>camel-framebuffer</module>
		<module>camel-openimaj</module>
		<module>camel-pubnub</module>
		<module>camel-pubnub-feature</module>
	</modules>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.5.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Export-Package>${camel.osgi.export.pkg}</Export-Package>
						<Export-Service>${camel.osgi.export.service}</Export-Service>
					</instructions>
				</configuration>
			</plugin>
			<!-- use Camel plugins to generate component details -->
			<plugin>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-package-maven-plugin</artifactId>
				<version>${camel.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>generate-components-list</goal>
						</goals>
						<phase>generate-resources</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<reuseForks>false</reuseForks>
					<excludes>
						<exclude>**/*IntTest*</exclude>
					</excludes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- enables the APT dependency so that it can be disabled in IDE builds -->
		<profile>
			<id>apt</id>
            <!-- Disabled APT profile for a while, as it causes Maven build to fail with the OutOfMemoryError. -->
			<!-- See - https://github.com/rhiot/rhiot/issues/169 -->
            <!--<activation>-->
				<!--<property>-->
					<!--<name>!dummy.prop.to.keep.this.profile.active.even.when.other.profiles.are.active</name>-->
				<!--</property>-->
			<!--</activation>-->

			<dependencies>
				<!-- enable the APT processor -->
				<dependency>
					<groupId>org.apache.camel</groupId>
					<artifactId>apt</artifactId>
					<version>${camel.version}</version>
					<scope>provided</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>itest</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<excludes>
								<exclude>**/*.xml</exclude>
							</excludes>
							<includes>
								<include>**/*IntTest*</include>
							</includes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
