<?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>3.0.2</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>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/core</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core</developerConnection>
        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/core</url>
      <tag>Apache-Synapse-3.0.2</tag>
  </scm>

    <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>
                                    <version>${addressing.version}</version>
                                    <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-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>test-library-assembly</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <finalName>synapse</finalName>	
                            <descriptors>
                                <descriptor>src/test/resources/synapse-libraries/assembly/assemble-lib.xml
                                </descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                     <execution>
                        <id>eip-library-assembly</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <finalName>synapse</finalName>
                            <descriptors>
                                <descriptor>src/test/resources/synapse-libraries/assembly/assemble-eiptest-lib.xml
                                </descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                     <execution>
                        <id>eipcore-library-assembly</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <finalName>synapse</finalName>
                            <descriptors>
                                <descriptor>src/test/resources/synapse-libraries/assembly/assemble-eipcore-lib.xml
                                </descriptor>
                            </descriptors>
                        </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" />
                                <mkdir dir="target/test_repos/synapse/synapse-libraries" />
                                <mkdir dir="target/library_repos" />
                                <copy file="target/synapse-test-lib.zip" todir="target/test_repos/synapse/synapse-libraries" />
                                <copy file="target/synapse-eiptest-lib.zip" todir="target/test_repos/synapse/synapse-libraries" />
                                <copy file="target/synapse-eipcore-lib.zip" todir="target/library_repos" />
                            </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>
                    </systemProperties>
                    <environmentVariables>
                        <SOAP_SERVICE_TEST>http://localhost:9000/services/SimpleStockQuoteService</SOAP_SERVICE_TEST>
                        <scope>test</scope>
                    </environmentVariables>
                    <forkMode>pertest</forkMode>
                    <!--<redirectTestOutputToFile>true</redirectTestOutputToFile>-->
                    <!--<workingDirectory>../..</workingDirectory>-->
                    <childDelegation>false</childDelegation>
                </configuration>
            </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.libraries.*,
                            org.apache.synapse.message.*,
                            org.apache.synapse.metrics.*,
                            org.apache.synapse.registry.*,
                            org.apache.synapse.rest.*,
                            org.apache.synapse.startup.*,
                            org.apache.synapse.util.*,
                        </Export-Package>
                        <Import-Package>
                            !javax.xml.namespace,
                            javax.xml.namespace; version=0.0.0,
                            !javax.xml.soap,
                            javax.xml.soap; version=0.0.0,
                            !org.apache.commons.io,
                            org.apache.commons.io; version=0.0.0,
                            org.quartz.*; version=0.0.0,
                            *;resolution:=optional,
                        </Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-clustering</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-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>org.wso2.eventing</groupId>
            <artifactId>wso2eventing-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.caching</groupId>
            <artifactId>wso2caching-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.uri.template</groupId>
            <artifactId>wso2-uri-templates</artifactId>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>saxon</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>saxon-dom</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-jms</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-mail</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-json</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-vfs-transport</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-dom</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.soap</groupId>
            <artifactId>jakarta.xml.soap-api</artifactId>
        </dependency>

    </dependencies>
</project>
