<?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>
    
    <artifactId>mule-module-anypoint-mq-ee-studio</artifactId>
	<packaging>eclipse-repository</packaging>

	<parent>
		<groupId>org.mule.tooling.messaging</groupId>
		<artifactId>org.mule.tooling.messaging.parent</artifactId>
		<version>1.0.0</version>
	</parent>

	<properties>
		<category>Premium</category>
		<licensePath>LICENSE.md</licensePath>
		<mule.devkit.version>3.7.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>${tycho-version}</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-module-anypoint-mq-ee-studio-1.0.0.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}\${project.artifactId}-${project.version}.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.4.1</version>
						<executions>
							<execution>
								<phase>install</phase>
								<goals>
									<goal>sign-us</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

    <pluginRepositories>
        <pluginRepository>
            <id>nexus.repository</id>
            <name>Nexus Repository</name>
            <layout>default</layout>
            <url>http://repository.mulesoft.org/nexus/content/repositories/releases/</url>
        </pluginRepository>
        <pluginRepository>
            <id>nexus.snapshots.repository</id>
            <name>Nexus Snapshots Repository</name>
            <layout>default</layout>
            <url>http://repository.mulesoft.org/nexus/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>

</project>
