<?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.7.0</version>
    </parent>

    <properties>
        <mule.version>3.5.0</mule.version>
        <category>Community</category>
        <licensePath>LICENSE.md</licensePath>
        <mule.devkit.version>3.4.0</mule.devkit.version>
        <finalName>mule-transport-amqp-studio-${project.version}-studio-plugin</finalName>
    </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>
                    <finalName>${finalName}</finalName>
                    <compress>false</compress>
                </configuration>
            </plugin>
            <plugin>
                <!-- AMQP-54: Added as a workaround to install/deploy the update-site with the 'studio-plugin' classifier.
                For an unknown reason the tycho-p2-repository-plugin use the ${finalName} property in the package phase
                but then in the install phase the maven-install-plugin use mule-transport-amqp-studio-${version}.zip -->
                <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}\${finalName}.zip</file>
                                    <type>zip</type>
                                    <classifier>studio-plugin</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
