<?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>
    <artifactId>mule-module-ms-dynamics-crm-onpremise</artifactId>
    <packaging>mule-module</packaging>
    <name>Mule MS Dynamics CRM Onpremise Connector</name>
    
    <parent>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-module-ms-dynamics-crm</artifactId>
        <version>1.4</version>
    </parent>
    
    <properties>
    	<category>Standard</category>
        <licensePath>LICENSE.md</licensePath>
        <cxf.version>2.6.0</cxf.version>
        <github.merge>true</github.merge>
    </properties>

    <build>
    	<plugins>
        	<plugin>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-codegen-plugin</artifactId>
				<version>${cxf.version}</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<configuration>
							<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
							<wsdlOptions>
								<wsdlOption>
									<wsdl>${basedir}/src/main/resources/wsdl/2011/Organization.wsdl</wsdl>
									<bindingFiles>
                                        <bindingFile>${basedir}/src/main/resources/wsdl/binding.xml</bindingFile>
                                    </bindingFiles>
    							</wsdlOption>
							</wsdlOptions>
						</configuration>
						<goals>
							<goal>wsdl2java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
                <groupId>org.mule.tools.devkit</groupId>
                <artifactId>mule-devkit-maven-plugin</artifactId>
                <configuration>
                    <path>onpremise</path>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>github-upload-doc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
		</plugins>
    </build>
    
    <dependencies>
<!-- 		********** IMPORTANT ***************** -->
<!-- 		This packages are here because the Kerberos\SPENGO token negotiation for a TGT with a WS requires -->
<!-- 		CXF 2.5.3 or greater and WSS4J 1.6.5 or greater. -->
<!-- 		I removed the mule-module-cxf dependency and added manually all the dependencies that he envelopes. -->
<!-- 		But the cxf version i use is greater than the one in the mule module, so its necessary to add in the mule project -->
<!-- 		a loader.override -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-api</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-core</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-simple</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-security</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-rm</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-ws-addr</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-wstx-msv-validation</artifactId>
			<version>${cxf.version}</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.cxf</groupId>
		    <artifactId>cxf-rt-ws-policy</artifactId>
		    <version>${cxf.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>3.1.1.RELEASE</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>3.1.1.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>3.1.1.RELEASE</version>
			<scope>provided</scope>
		</dependency>
<!-- 	END OF REPLACEMENT OF DEPENDENCIES CONTAINED IN mule-module-cxf -->
		<dependency>
			<groupId>xalan</groupId>
			<artifactId>xalan</artifactId>
			<version>2.7.0</version>
		</dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>mule-ee-snapshot</id>
            <name>EE Repository Snapshots</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/snapshots</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mule-ee</id>
            <name>EE Repository Releases</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/releases</url>
            <layout>default</layout>
       </repository>
       <repository>
            <id>codehaus-releases</id>
            <name>CodeHaus Releases</name>
            <url>http://repository.codehaus.org/</url>
        </repository>
    </repositories>
</project>
