<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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.templates</groupId>
		<artifactId>templates-tooling-parent-pom</artifactId>
		<version>1.0.13</version>
	</parent>

	<artifactId>template-sfdc2sap-opportunity-migration</artifactId>
	<packaging>mule</packaging>
	<version>1.0.0</version>
	<name>template-sfdc2sap-opportunity-migration Anypoint Template Project</name>

	<properties>
		<sap.jco.version>3.0.10</sap.jco.version>
		<sap.idoc.version>3.0.10</sap.idoc.version>
		<sap.build.type>mac64</sap.build.type>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.mule.tools</groupId>
				<artifactId>maven-mule-plugin</artifactId>
				<configuration>
					<copyToAppsDirectory>true</copyToAppsDirectory>
					<inclusions>
					</inclusions>
				</configuration>
			</plugin>

			<!-- SAP Build -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>com.sap.conn.jco</groupId>
									<artifactId>sapjco-native</artifactId>
									<version>${sap.jco.version}</version>
									<classifier>${sap.build.type}</classifier>
									<type>jar</type>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/temp-native-lib</outputDirectory>
									<includes>**/*.dll,**/*.so,**/*.jnilib</includes>
									<excludes>META-INF</excludes>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>add-native-lib</id>
						<phase>package</phase>
						<configuration>
							<tasks>
								<zip destfile="${project.build.directory}/${project.build.finalName}.zip" update="true">
									<zipfileset dir="${project.build.directory}/temp-native-lib" prefix="lib" />
								</zip>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Connectors -->
		<dependency>
			<groupId>org.mule.modules</groupId>
			<artifactId>mule-module-sfdc</artifactId>
			<version>${sfdc.version}</version>
		</dependency>
		<dependency>
			<groupId>com.mulesoft.muleesb.transports</groupId>
			<artifactId>mule-transport-sap</artifactId>
			<version>${sap.version}</version>
		</dependency>

		<!-- SAP Dependencies -->
		<dependency>
			<groupId>com.sap.conn.jco</groupId>
			<artifactId>sapjco3</artifactId>
			<version>${sap.jco.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sap.conn.jco</groupId>
			<artifactId>sapjco-native</artifactId>
			<version>${sap.jco.version}</version>
			<classifier>${sap.build.type}</classifier>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.sap.conn.idoc</groupId>
			<artifactId>sapidoc3</artifactId>
			<version>${sap.idoc.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.mulesoft.muleesb.modules</groupId>
			<artifactId>mule-module-batch-ee</artifactId>
			<version>${mule.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.3.2</version>
		</dependency>

	<dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-http</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
    <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-spring-config</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
    <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-json</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
    <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-module-xml</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
    <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-email</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

	<repositories>
		<repository>
			<id>mulesoft-releases</id>
			<name>MuleSoft Releases Repository</name>
			<url>https://repository.mulesoft.org/nexus/content/repositories/releases/</url>
			<layout>default</layout>
		</repository>
		<repository>
			<id>mulesoft-snapshots</id>
			<name>MuleSoft Snapshots Repository</name>
			<url>https://repository.mulesoft.org/nexus/content/repositories/snapshots/</url>
			<layout>default</layout>
		</repository>
		<repository>
			<id>mule-ee-thirdparty</id>
			<name>MuleSoft Thirdparty Repository</name>
			<url>https://repository.mulesoft.org/nexus/content/repositories/thirdparty/</url>
			<layout>default</layout>
		</repository>
	</repositories>

	<scm>
		<connection>scm:git:https://github.com/mulesoft/template-sfdc2sap-opportunity-migration.git</connection>
		<developerConnection>scm:git:https://github.com/mulesoft/template-sfdc2sap-opportunity-migration.git</developerConnection>
		<url>http://github.com/mulesoft/template-sfdc2sap-opportunity-migration</url>
	  <tag>v1.0.0</tag>
  </scm>
</project>
