<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.mule.modules</groupId>
	<artifactId>mule-transport-amqp-studio</artifactId>
	<packaging>eclipse-repository</packaging>
	<parent>
		<artifactId>mule-transport-amqp-plugin-parent</artifactId>
		<groupId>org.mule.transports</groupId>
		<version>3.3.0</version>
	</parent>

	<properties>
		<mule.version>3.3.2</mule.version>
		<category>Community</category>
		<licensePath>LICENSE.md</licensePath>
		<mule.devkit.version>3.3.2</mule.devkit.version>
	</properties>
	
	<build>
		<plugins>
				<plugin>
           			<artifactId>maven-deploy-plugin</artifactId>
           			<configuration>
             			<skip>false</skip>
           			</configuration>
         		</plugin>
			      <plugin>
			        <groupId>org.eclipse.tycho</groupId>
			        <artifactId>tycho-p2-publisher-plugin</artifactId>
			        <version>${tycho-version}</version>
			        <configuration>
			          <publishArtifacts>true</publishArtifacts>
			        </configuration>
			      </plugin>			      
			      <plugin>
	                <groupId>org.eclipse.tycho</groupId>
	                <artifactId>tycho-p2-repository-plugin</artifactId>
	                <version>0.14.0</version>
	                <configuration>
	                    <compress>false</compress>
	                </configuration>
	            </plugin>
	            <plugin>
				    <groupId>org.apache.maven.plugins</groupId>
				    <artifactId>maven-antrun-plugin</artifactId>
				    <version>1.6</version>
				    <executions>
				        <execution>
				            <id>unzip-update-site</id>
				            <phase>package</phase>
				            <configuration>
				                <tasks>
				                    <echo message="prepare update-site for signing" />
				                    <unzip src="${project.build.directory}\mule-transport-amqp-studio.zip" dest="${project.build.directory}\update-site\" />
				                </tasks>
				            </configuration>
				            <goals>
				                <goal>run</goal>
				            </goals>
				        </execution>
				    </executions>
				</plugin>

		</plugins>	
	</build>
	<profiles>
		<profile>
	        <id>update-site</id>
	        <build>
	            <plugins>
	            <plugin>
		        	<groupId>org.codehaus.mojo</groupId>
				    <artifactId>build-helper-maven-plugin</artifactId>
				    <version>1.7</version>
				    <executions>
				        <execution>
				            <id>attach-artifacts</id>
				            <phase>package</phase>
				            <goals>
				                <goal>attach-artifact</goal>
				            </goals>
				            <configuration>
				                <artifacts>
				                    <artifact>
				                        <file>${project.build.directory}\UpdateSite.zip</file>
				                        <type>zip</type>
				                        <classifier>studio-plugin</classifier>
				                    </artifact>
				                </artifacts>
				            </configuration>
				        </execution>
				    </executions>
				</plugin>
	                <plugin>
	                    <groupId>org.mule.tooling</groupId>
	                    <artifactId>studio-us-signer</artifactId>
	                    <version>1.1</version>
	                    <executions>
	                        <execution>
	                            <phase>package</phase>
	                            <goals>
	                                <goal>sign-us</goal>
	                            </goals>
	                        </execution>
	                    </executions>
	                </plugin>
	            </plugins>
	        </build>
	    </profile>
	</profiles>
</project>
