<?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>com.mulesoft.mule.framework</groupId>
        <artifactId>mule-framework-latest-bundle-parent</artifactId>
        <version>1.2.3</version>
    </parent>

    <artifactId>mule-framework-latest-bundle</artifactId>
    <packaging>pom</packaging>

    <name>Mule Framework Bundle for Latest Released Mule Runtime</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-custom-latest-bundle</id>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <phase>generate-test-resources</phase>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.mulesoft.mule.framework</groupId>
                                    <artifactId>mule-libs-latest-bundle</artifactId>
                                    <type>zip</type>
                                    <version>${project.version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.mulesoft.mule.framework</groupId>
                                    <artifactId>mule-services-latest-bundle</artifactId>
                                    <type>zip</type>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/bundle</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                	<appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>src/main/assembly/bundle.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-libs-latest-bundle</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-services-latest-bundle</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
    </dependencies>
</project>
