<?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>
    <parent>
        <groupId>org.mule.distributions</groupId>
        <artifactId>mule-embedded</artifactId>
        <version>4.1.5-hf10</version>
    </parent>
    <artifactId>mule-embedded-distribution</artifactId>
    <packaging>pom</packaging>
    <name>Embedded (Single jar file)</name>
    <description>Assembles the Mule core, modules, and transports into a single library (jar). This is useful for embedding Mule into an existing project.</description>

    <properties>
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeGroupIds>org.mule</includeGroupIds>
                            <excludes>**/spring.schemas,**/mule.schemas,**/registry-bootstrap.properties,**/mule.custom-property-editors,org/slf4j/**,org/apache/commons/logging/**</excludes>
                            <excludeTypes>pom</excludeTypes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>${project.basedir}/BuildAggregator.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>assembly.xml</descriptor>
                            </descriptors>
                            <appendAssemblyId>false</appendAssemblyId>
                            <archive>
                                <manifestEntries>
                                    <More-Info>For more information go to ${productUrl}</More-Info>
                                    <Support>Get commercial support: ${project.organization.url}/support</Support>
                                    <Description>Mule Runtime and Integration Platform</Description>
                                    <License>CPAL v1.0 http://www.mulesoft.com/CPAL/</License>
                                    <Vendor-Url>${project.organization.url}</Vendor-Url>
                                    <Product-Url>${productUrl}</Product-Url>
                                    <Build-Date>${timestamp}</Build-Date>
                                    <Supported-Jdks>[1.8.0_20,1.9)</Supported-Jdks>
                                    <Recommended-Jdks>[1.8.0_112,1.9)</Recommended-Jdks>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <!-- Do not publish (empty) source jars -->
                    <attach>false</attach>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-modules-all</artifactId>
            <version>${mule.version}</version>
            <type>pom</type>
        </dependency>

        <!-- TODO MULE-9655 Determine how services and extensions work in embedded mode -->
        <dependency>
            <groupId>org.mule.distributions</groupId>
            <artifactId>mule-services-all</artifactId>
            <version>${mule.version}</version>
            <type>pom</type>
        </dependency>
    </dependencies>
</project>
