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

	<!-- Version -->
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.mule.modules</groupId>
	<artifactId>mule-module-apikit-odata</artifactId>
	<version>1.0.11-SNAPSHOT</version>
	<description>Module for creating API's using the OData service</description>

    <!-- Organization -->
    <organization>
        <name>MuleSoft, Inc.</name>
        <url>http://www.mulesoft.com</url>
    </organization>

    <!-- Project -->
    <name>APIKit OData Extension</name>

	<!-- Properties -->
	<properties>
		<mule.version>3.8.1</mule.version>
		<apikit.version>3.8.2</apikit.version>
		<licensePath>LICENSE_HEADER.txt</licensePath>
		<jacoco.version>0.8.5</jacoco.version>
		<maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
		<allureJunitVersion>2.13.3</allureJunitVersion>
		<allureReportVersion>2.3.4</allureReportVersion>
		<allure.maven.plugin.version>2.10.0</allure.maven.plugin.version>
	</properties>

	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<header>${licensePath}</header>
					<excludes>
						<exclude>target/**</exclude>
						<exclude>**/.gitignore</exclude>
						<exclude>**/*.txt</exclude>
						<exclude>**/*.ftl</exclude>
						<exclude>**/*.xml</exclude>
						<exclude>**/*.properties</exclude>
						<exclude>**/*.md</exclude>
					</excludes>
					<includes>
						<include>**/*.java</include>
					</includes>
					<mapping>
						<java>SLASHSTAR_STYLE</java>
					</mapping>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven.surefire.plugin.version}</version>
				<configuration>
					<argLine>-Dfile.encoding=UTF-8
						-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>
					<systemPropertyVariables>
						<!-- Just propagate this variable due to surefire will not do this when forked vm for tests -->
						<mule.freePortFinder.lockPath>${java.io.tmpdir}/mule/freePortFinder
						</mule.freePortFinder.lockPath>
						<maven.projectVersion>${project.version}</maven.projectVersion>
					</systemPropertyVariables>
					<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>
				</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>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.mule</groupId>
			<artifactId>mule-core</artifactId>
			<version>${mule.version}</version>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mule.modules</groupId>
			<artifactId>mule-module-apikit</artifactId>
			<version>${apikit.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mule.raml</groupId>
			<artifactId>parser-interface-impl-v2</artifactId>
			<version>${apikit.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mule.tools</groupId>
			<artifactId>apikit-maven-plugin</artifactId>
			<version>${apikit.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mule.modules</groupId>
			<artifactId>mule-module-apikit-spi</artifactId>
			<version>${apikit.version}</version>
			<scope>provided</scope>
		</dependency>

        <!-- OData4J / Oreva -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
			<version>3.2.5</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.oreva</groupId>
			<artifactId>odata-core</artifactId>
			<version>0.8.1</version>
		</dependency>

		<!-- Commons Lang -->
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
		</dependency>

		<!-- GSon -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.3.1</version>
		</dependency>

		<!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>1.2.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.10.19</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.23</version>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20140107</version>
		</dependency>

		<dependency>
			<groupId>org.skyscreamer</groupId>
			<artifactId>jsonassert</artifactId>
			<version>1.3.0</version>
		</dependency>

		<dependency>
			<groupId>org.jibx</groupId>
			<artifactId>jibx-tools</artifactId>
			<version>1.2.6</version>
		</dependency>

		<dependency>
			<groupId>io.qameta.allure</groupId>
			<artifactId>allure-junit4</artifactId>
			<version>${allureJunitVersion}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

    <repositories>
        <repository>
            <id>jboss-releases</id>
            <name>JBoss Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>https://repository-master.mulesoft.org/releases/</url>
        </repository>
        <snapshotRepository>
            <id>mulesoft-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>https://repository-master.mulesoft.org/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

	<profiles>
		<profile>
			<id>security</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>2.5.1</version>
						<executions>
							<execution>
								<id>copy-dependencies</id>
								<phase>package</phase>
								<goals>
									<goal>copy-dependencies</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}/lib/</outputDirectory>
									<includeScope>runtime</includeScope>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
