<?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">

  <modelVersion>4.0.0</modelVersion>

    <groupId>com.zsmartsystems.zigbee</groupId>
    <artifactId>com.zsmartsystems.zigbee.p2repo</artifactId>
    <packaging>pom</packaging>

    <parent>
        <groupId>com.zsmartsystems</groupId>
        <artifactId>zigbee</artifactId>
        <version>1.4.11</version>
        <relativePath>../../</relativePath>
    </parent>

    <profiles>
      <profile>
	<!-- Profile generates p2 repo for built artifacts in releng/p2repo/target/repository -->
	<id>p2repo</id>

	<build>
	  <plugins>
	    
	    <plugin>
	      <artifactId>maven-assembly-plugin</artifactId>
	      <version>2.6</version>
	      <executions>
		<execution>
		  <id>aggregate</id>
		  <phase>package</phase>
		  <goals>
		    <goal>single</goal>
		  </goals>
		  <configuration>
		    <appendAssemblyId>false</appendAssemblyId>
		    <finalName>bundles</finalName>
		    <descriptors>
		      <descriptor>assembly.xml</descriptor>
		    </descriptors>
		  </configuration>
		</execution>
	      </executions>
	    </plugin>
	    
	    <plugin>
	      <groupId>org.eclipse.tycho.extras</groupId>
	      <artifactId>tycho-p2-extras-plugin</artifactId>
	      <version>1.0.0</version>
	      <executions>
		<execution>
		  <id>p2</id>
		  <goals>
		    <goal>publish-features-and-bundles</goal>
		  </goals>
		  <phase>package</phase>
		</execution>
	      </executions>
	      <configuration>
		<sourceLocation>${project.build.directory}/bundles</sourceLocation>
	      </configuration>
	    </plugin>
	  </plugins>
	</build>
      </profile>
    </profiles>

</project>
