<?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.axis2</groupId>
        <artifactId>axis2-transports</artifactId>
        <version>1.0.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-transport-sms</artifactId>
    <name>Apache Axis2 - Transport - Sms</name>
    <description>Apache Axis2 - SmsTransport</description>
    <packaging>bundle</packaging>

    <build>
        <resources>
            <resource>
                <directory>../..</directory>
                <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>1.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Version>1.0</Bundle-Version>
                        <Bundle-Name>${pom.artifactId}</Bundle-Name>
                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
                        <Bundle-Description>${pom.description}</Bundle-Description>
                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                        <Export-Package>
                            org.apache.axis2.transport.sms.*;-split-package:=merge-last,
                        </Export-Package>
                        <Import-Package>
                            !javax.xml.namespace,
                            javax.xml.namespace; version=0.0.0,
                            *; resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.aspectj</groupId>
                                    <artifactId>aspectjweaver</artifactId>
                                    <outputDirectory>target/lib</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>log4j.configuration</name>
                            <value>file:../../log4j.properties</value>
                        </property>
                        <property>
                            <name>net.sourceforge.cobertura.datafile</name>
                            <value>target/cobertura.ser</value>
                        </property>
                    </systemProperties>
                    <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-repo</id>
                        <phase>test-compile</phase>
                        <configuration>
                            <tasks unless="maven.test.skip">
                                <mkdir dir="target/test-resources/samples/conf"/>
                                <mkdir dir="target/test-resources/samples/repository/modules"/>
                                <mkdir dir="target/test-resources/samples/repository/services"/>
                                <mkdir
                                        dir="target/test-resources/samples/repository/services/SampleService/org/apache/axis2/transport/sms"/>
                                <mkdir
                                        dir="target/test-resources/samples/repository/services/SampleService/META-INF"/>
                                <copy file="${settings.localRepository}/org/apache/axis2/addressing/${axis2.version}/addressing-${axis2.version}.mar"
                                      tofile="target/test-resources/samples/repository/modules/addressing.mar"/>
                                <copy file="target/test-classes/org/apache/axis2/transport/sms/SimpleInOutMessageReceiver.class"
                                      tofile="target/test-resources/samples/repository/services/SampleService/org/apache/axis2/transport/sms/SimpleInOutMessageReceiver.class"/>
                                <copy file="conf/axis2.xml"
                                      tofile="target/test-resources/samples/conf/axis2.xml"/>
                                <copy file="repository/services/SampleService/META-INF/MANIFEST.MF"
                                      tofile="target/test-resources/samples/repository/services/SampleService/META-INF/MANIFEST.MF"/>
                                <copy file="repository/services/SampleService/META-INF/services.xml"
                                      tofile="target/test-resources/samples/repository/services/SampleService/META-INF/services.xml"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>apache-snapshots</id>
            <name>Apache Maven 2 Snapshot Repository</name>
            <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <updatePolicy>interval:10080</updatePolicy>
                <!-- i.e. refresh weekly -->
            </snapshots>
        </repository>
        <repository>
            <id>wso2-m2</id>
            <name>WSO2 Maven 2 Repository</name>
            <url>http://dist.wso2.org/maven2/</url>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <updatePolicy>interval:10080</updatePolicy>
                <!-- i.e. refresh weekly -->
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-base</artifactId>
            <version>${version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code</groupId>
            <artifactId>jsmpp</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.4.3</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.4.3</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.smslib</groupId>
            <artifactId>smslib</artifactId>
            <version>3.4.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <properties>
        <jsmpp-version>2.0.1</jsmpp-version>
        <slf4j-version>1.4.3</slf4j-version>
    </properties>
</project>
