<?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>

    <groupId>org.mule.connectors</groupId>
    <artifactId>mule-soap-engine</artifactId>
    <version>1.6.12</version>
    <name>Mule SOAP Engine</name>

    <properties>
        <mavenCompilerVersion>3.10.1</mavenCompilerVersion>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>

        <cxfVersion>3.5.2</cxfVersion>
        <xmlSecVersion>2.2.3</xmlSecVersion>
        <xmlUnitVersion>2.9.0</xmlUnitVersion>
        <springVersion>5.3.20</springVersion>
        <commonsCodecVersion>1.15</commonsCodecVersion>
        <woodstoxVersion>6.2.8</woodstoxVersion>
        <jettyVersion>9.4.46.v20220331</jettyVersion>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <wsdlParserVersion>1.4.4</wsdlParserVersion>
        <metadataModelVersion>1.1.3</metadataModelVersion>
        <javaFormatterVersion>2.16.0</javaFormatterVersion>
        <java.xml.bind.impl.version>3.0.2</java.xml.bind.impl.version>
        <java.xml.bind.core.version>3.0.2</java.xml.bind.core.version>
        <javax.activation.version>1.2.0</javax.activation.version>
        <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
        <javax.jaxws-api.version>2.3.1</javax.jaxws-api.version>
        <javax.jws-api.version>1.1</javax.jws-api.version>
        <javax.xml.soap-api.version>1.4.0</javax.xml.soap-api.version>
        <xml.messaging.saaj.version>2.0.1</xml.messaging.saaj.version>

        <!--Formatter props-->
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <formatterGoal>validate</formatterGoal>
        <javaVersion>1.8</javaVersion>
        <skipVerifications>false</skipVerifications>

        <saxon.version>11.3</saxon.version>
        <stax.utils.version>20080702</stax.utils.version>
        <dom4j.version>2.1.3</dom4j.version>
        <caffeine.version>2.9.3</caffeine.version>
        <apache.http.client.version>4.5.13</apache.http.client.version>
        <commons.io.version>2.11.0</commons.io.version>
        <commons.lang.version>3.12.0</commons.lang.version>

        <!-- TEST -->
        <junit.version>4.13.2</junit.version>
        <hamcrest.version>2.2</hamcrest.version>
        <mockito.version>4.6.1</mockito.version>
        <jacoco.version>0.8.8</jacoco.version>

        <aspectjVersion>1.9.9.1</aspectjVersion>
        <allureJunitVersion>2.18.1</allureJunitVersion>
        <allureReportVersion>2.3.4</allureReportVersion>
        <allure.maven.plugin.version>2.11.2</allure.maven.plugin.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerVersion}</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>${javaVersion}</source>
                    <target>${javaVersion}</target>
                    <proc>none</proc>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${javaFormatterVersion}</version>
                <configuration>
                    <compilerCompliance>${javaVersion}</compilerCompliance>
                    <compilerSource>${javaVersion}</compilerSource>
                    <compilerTargetPlatform>${javaVersion}</compilerTargetPlatform>
                    <configFile>${basedir}/${formatterConfigPath}</configFile>
                    <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                    <aggregator>false</aggregator>
                    <executionRoot>true</executionRoot>
                    <encoding>ISO-8859-1</encoding>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>${formatterGoal}</goal>
                        </goals>
                        <configuration>
                            <skipFormatting>${skipVerifications}</skipFormatting>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8 -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjVersion}/aspectjweaver-${aspectjVersion}.jar -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile='${session.executionRootDirectory}/target/jacoco.exec'</argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>io.qameta.allure.junit4.AllureJunit4</value>
                        </property>
                    </properties>
                    <systemProperties>
                        <property>
                            <name>allure.results.directory</name>
                            <value>${project.build.directory}/allure-results</value>
                        </property>
                    </systemProperties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jacoco</groupId>
                        <artifactId>org.jacoco.agent</artifactId>
                        <version>${jacoco.version}</version>
                        <classifier>runtime</classifier>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectjVersion}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-maven</artifactId>
                <version>${allure.maven.plugin.version}</version>
                <configuration>
                    <reportVersion>${allureReportVersion}</reportVersion>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <!-- CXF -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-core</artifactId>
            <version>${cxfVersion}</version>
            <exclusions>
                <!-- We use the one bundled with the JDK -->
                <exclusion>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.woodstox</groupId>
                    <artifactId>woodstox-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.woodstox</groupId>
            <artifactId>woodstox-core</artifactId>
            <version>${woodstoxVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-rm</artifactId>
            <version>${cxfVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-ws-security</artifactId>
            <version>${cxfVersion}</version>
            <exclusions>
                <!-- We use slf4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <!-- We use BouncyCastle 1.58 -->
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15on</artifactId>
                </exclusion>
                <!--  Contains shaded jetty classes with security problems -->
                <exclusion>
                    <groupId>net.sf.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                </exclusion>
                <!-- We use version 1.2.4 -->
                <exclusion>
                    <groupId>org.cryptacular</groupId>
                    <artifactId>cryptacular</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.cryptacular</groupId>
            <artifactId>cryptacular</artifactId>
            <version>1.2.5</version>
            <exclusions>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15on</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-simple</artifactId>
            <version>${cxfVersion}</version>
            <exclusions>
                <!-- We use the one bundled with the JDK -->
                <exclusion>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- WSDL PARSER -->
        <dependency>
            <groupId>org.mule.wsdl</groupId>
            <artifactId>mule-wsdl-parser</artifactId>
            <version>${wsdlParserVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mule.runtime</groupId>
                    <artifactId>mule-metadata-model-xml</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!--  These spring dependencies are needed by cxf's SpringBusFactory -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${springVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${springVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.4</version>
        </dependency>

        <!-- We should use this version to work with CXF 3-->
        <!--<dependency>
            <groupId>org.apache.santuario</groupId>
            <artifactId>xmlsec</artifactId>
            <version>${xmlSecVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-codec</groupId>
                    <artifactId>commons-codec</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commonsCodecVersion}</version>
        </dependency>

        <!-- XML Handling -->
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>${saxon.version}</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.stax-utils</groupId>
            <artifactId>stax-utils</artifactId>
            <version>${stax.utils.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.bea.xml</groupId>
                    <artifactId>jsr173-ri</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>${dom4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-xml</artifactId>
            <version>${metadataModelVersion}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Commons -->
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>${caffeine.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.36</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.36</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons.lang.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>${java.xml.bind.impl.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>${java.xml.bind.core.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
            <version>${xml.messaging.saaj.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>javax.activation</artifactId>
            <version>${javax.activation.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>${javax.annotation-api.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.soap</groupId>
            <artifactId>javax.xml.soap-api</artifactId>
            <version>${javax.xml.soap-api.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>${javax.jaxws-api.version}</version>
        </dependency>

        <!-- Test Server -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>${cxfVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxfVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxfVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
            <version>${jettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>${jettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
            <version>${jettyVersion}</version>
            <scope>test</scope>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>javax.jws</groupId>
            <artifactId>javax.jws-api</artifactId>
            <version>${javax.jws-api.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.xmlunit</groupId>
            <artifactId>xmlunit-legacy</artifactId>
            <version>${xmlUnitVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${apache.http.client.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit4</artifactId>
            <version>${allureJunitVersion}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    
    <distributionManagement>
        <downloadUrl>http://www.mulesoft.org/display/MULE/Download</downloadUrl>
        <repository>
            <id>mule-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>mule</id>
            <name>Mule Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>mule-plugin</id>
            <name>Mule Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
        </pluginRepository>
    </pluginRepositories>
    
</project>
