<?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>org.mule.extensions</groupId>
        <artifactId>mule-modules-parent</artifactId>
        <version>1.8.0</version>
    </parent>

    <groupId>com.mulesoft.mule.extensions</groupId>
    <artifactId>mule-modules-soap-parent</artifactId>
    <version>1.8.0</version>
    <packaging>pom</packaging>
    <name>Mule Soap Modules Parent POM</name>
    <description>Mule Modules that augment the core Mule functionality through the Mule SOAP Extension API</description>

    <scm>
        <connection>scm:git:git://github.com/mulesoft/mule-extensions-soap-parent.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/mule-extensions-soap-parent.git</developerConnection>
        <url>https://github.com/mulesoft/mule-extensions-soap-parent</url>
    </scm>

    <properties>
        <apt.phase>compile</apt.phase>
        <mule.extensions.soap.api>1.8.0</mule.extensions.soap.api>
        <mule.extensions.soap.support>4.8.0</mule.extensions.soap.support>
        <!-- Prevent doing the annotation processing during compilation, because compiled classes are not available yet -->
        <extensionsAnnotationProcessorCompileProc>none</extensionsAnnotationProcessorCompileProc>
        <extensionsAnnotationProcessor>org.mule.runtime.module.extension.internal.resources.SoapExtensionResourcesGeneratorAnnotationProcessor</extensionsAnnotationProcessor>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <executions>
                        <!-- Do just the annotation processing part, but with access to the compiled classes -->
                        <execution>
                            <phase>compile</phase>
                            <id>post-compile-annotaiton-processing</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <proc>only</proc>
                                <compilerArgs combine.children="append">
                                    <arg>-Aextension.classes=${project.build.outputDirectory}</arg>
                                </compilerArgs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-extensions-soap-support</artifactId>
            <version>${mule.extensions.soap.support}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-extensions-soap-api</artifactId>
            <version>${mule.extensions.soap.api}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
