<?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.15</version>
	</parent>

	<artifactId>template-wday2sap-worker-aggregation</artifactId>
	<packaging>mule</packaging>
	<version>1.0.0</version>
	<name>template-wday2sap-worker-aggregation 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>
					<inclusion>
                            <groupId>com.mulesoft.muleesb.transports</groupId>
                            <artifactId>mule-transport-sap</artifactId>
                        </inclusion>
                    <inclusion>
                            <groupId>org.mule.modules</groupId>
                            <artifactId>mule-module-workday</artifactId>
                        </inclusion>
                    <inclusion>
                            <groupId>org.mule.modules</groupId>
                            <artifactId>mule-module-workday-humanresources</artifactId>
                        </inclusion>
                    </inclusions>
				</configuration>
			</plugin>
			<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>

	<dependency>
            <groupId>com.mulesoft.muleesb.transports</groupId>
            <artifactId>mule-transport-sap</artifactId>
            <version>${sap.version}</version>
        </dependency>
    <dependency>
            <groupId>org.mule.transports</groupId>
            <artifactId>mule-transport-email</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>

		<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>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-workday-humanresources</artifactId>
            <version>${wday.hr.version}</version>
        </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-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/</url>
        </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-wday2sap-worker-aggregation.git</connection>
		<developerConnection>scm:git:https://github.com/mulesoft/template-wday2sap-worker-aggregation.git</developerConnection>
		<url>http://github.com/mulesoft/template-wday2sap-worker-aggregation</url>
	  <tag>v1.0.0</tag>
  </scm>
</project>
