<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more 
	contributor license agreements. See the NOTICE file ~ distributed with this 
	work for additional information ~ regarding copyright ownership. The ASF 
	licenses this file ~ to you under the Apache License, Version 2.0 (the ~ 
	"License"); you may not use this file except in compliance ~ with the License. 
	You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 
	~ ~ Unless required by applicable law or agreed to in writing, ~ software 
	distributed under the License is distributed on an ~ * "AS IS" BASIS, WITHOUT 
	WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the 
	License for the ~ specific language governing permissions and limitations 
	~ under the License. -->

<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.apache.synapse</groupId>
		<artifactId>Apache-Synapse</artifactId>
		<version>2.1.7-wso2v79</version>
		<relativePath>../../pom.xml</relativePath>
	</parent>

	<groupId>org.apache.synapse</groupId>
	<artifactId>synapse-core</artifactId>

	<name>Apache Synapse - Core</name>
	<description>Apache Synapse - Core</description>
	<packaging>bundle</packaging>
	<url>http://synapse.apache.org</url>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy</id>
						<phase>generate-test-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.apache.axis2</groupId>
									<artifactId>addressing</artifactId>
									<type>mar</type>
									<overWrite>true</overWrite>
									<outputDirectory>target/test_repos/synapse/modules</outputDirectory>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>create_repo</id>
						<phase>generate-test-resources</phase>
						<configuration>
							<tasks>
								<echo message="*** Creating a testing repository ***" />
								<mkdir dir="target/test_repos" />
								<mkdir dir="target/test_repos/synapse/modules" />
								<mkdir dir="target/test_repos/synapse/services" />
								<mkdir dir="target/test_repos/client/modules" />
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemProperties>
						<property>
							<name>org.xml.sax.driver</name>
							<value>org.apache.xerces.parsers.SAXParser</value>
						</property>
						<property>
							<name>javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema</name>
							<value>org.apache.xerces.jaxp.validation.XMLSchemaFactory</value>
						</property>
						<property>
							<name>jacoco-agent.destfile</name>
							<value>
								target/coverage-reports/jacoco-unit-core.exec
							</value>
						</property>
					</systemProperties>
					<forkMode>pertest</forkMode>
					<!--<redirectTestOutputToFile>true</redirectTestOutputToFile> -->
					<!--<workingDirectory>../..</workingDirectory> -->
					<childDelegation>false</childDelegation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${maven.jacoco.plugin.version}</version>
				<executions>
					<execution>
						<id>default-instrument</id>
						<goals>
							<goal>instrument</goal>
						</goals>
					</execution>
					<execution>
						<id>default-restore-instrumented-classes</id>
						<goals>
							<goal>restore-instrumented-classes</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<dataFile>target/coverage-reports/jacoco-unit-core.exec</dataFile>
							<outputDirectory>target/coverage-reports/site</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.antlr</groupId>
				<artifactId>antlr3-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>antlr</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Attach a JAR with the test classes so that we can reuse them in other 
				modules (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Export-Package>
							org.apache.synapse,
							org.apache.synapse.aspects.*,
							org.apache.synapse.deployers.*,
							org.apache.synapse.executors.*,
							org.apache.synapse.config.*,
							org.apache.synapse.core.*,
							org.apache.synapse.endpoints.*,
							org.apache.synapse.eventing.*,
							org.apache.synapse.mediators.*,
							org.apache.synapse.message.*,
							org.apache.synapse.metrics.*,
							org.apache.synapse.registry.*,
							org.apache.synapse.rest.*,
							org.apache.synapse.inbound.*,
							org.apache.synapse.startup.*,
							org.apache.synapse.util.*,
							org.apache.synapse.libraries.*,
							org.apache.synapse.carbonext.*,
                            org.apache.synapse.continuation.*,
                            org.apache.synapse.debug.*,
                            org.apache.synapse.messageflowtracer.*
                        </Export-Package>
						<Import-Package>
							!javax.xml.namespace,
							javax.xml.namespace;
							version=0.0.0,
							!javax.xml.soap,
							javax.xml.soap; version=${javax.xml.soap.version},
							!org.apache.commons.io,
							org.apache.commons.io; version=0.0.0,
							org.quartz.*;version="${quartz.version}",
							*;resolution:=optional,
                        </Import-Package>
						<DynamicImport-Package>*</DynamicImport-Package>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.wso2.securevault</groupId>
			<artifactId>org.wso2.securevault</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.synapse</groupId>
			<artifactId>synapse-commons</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.synapse</groupId>
			<artifactId>synapse-tasks</artifactId>       
		</dependency>
		<dependency>
			<groupId>org.apache.synapse</groupId>
			<artifactId>synapse-nhttp-transport</artifactId>
		</dependency>
        <dependency>
            <groupId>javax.jms</groupId>
            <artifactId>jms</artifactId>
        </dependency>
	<dependency>
			<groupId>org.wso2.orbit.com.rabbitmq</groupId>
			<artifactId>amqp-client</artifactId>
			<version>${version.orbit.rabbitmq}</version>
		</dependency>
        <dependency>
            <groupId>org.apache.axis2.transport</groupId>
            <artifactId>axis2-transport-jms</artifactId>
            <!--<exclusions>-->
                <!--<exclusion>-->
                    <!--<groupId>javax.jms</groupId>-->
                    <!--<artifactId>jms</artifactId>-->
                <!--</exclusion>-->
            <!--</exclusions>-->
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>org.apache.axis2.transport</groupId>
			<artifactId>axis2-transport-mail</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.synapse</groupId>
			<artifactId>synapse-vfs-transport</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr-runtime</artifactId>
		</dependency>

		<!-- This is used by the CacheMediator. TODO: since axis2-saaj is based 
			on Axiom, it should not be necessary to rely on SAAJ and we should try to 
			eliminate this dependency. -->
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-saaj</artifactId>
		</dependency>
		<dependency>
			<groupId>com.damnhandy</groupId>
			<artifactId>handy-uri-templates</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jettison.wso2</groupId>
			<artifactId>jettison</artifactId>
		</dependency>
		<!--dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-json</artifactId>
			<version>1.6.1-wso2v10</version>
		</dependency-->
		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
		</dependency>
        <dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path-assert</artifactId>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>org.wso2.eventing</groupId>
            <artifactId>wso2eventing-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sandesha2</groupId>
            <artifactId>sandesha2-core</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>saxon-dom</artifactId>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
        </dependency>
        <!--  JSON Schema validator dependency -->
        <dependency>
            <groupId>org.wso2.orbit.com.github.fge</groupId>
            <artifactId>json-schema-validator-all</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.googlecode.libphonenumber</groupId>
            <artifactId>libphonenumber</artifactId>
        </dependency>
		<dependency>
			<groupId>org.jacoco</groupId>
			<artifactId>org.jacoco.agent</artifactId>
			<classifier>runtime</classifier>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito2</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-broker</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
<properties>
		<version.orbit.rabbitmq>3.6.6.wso2v1</version.orbit.rabbitmq>
	</properties>
</project>
