<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Version: 1.0
  ~
  ~ The contents of this file are subject to the OpenVPMS License Version
  ~ 1.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.openvpms.org/license/
  ~
  ~ Software distributed under the License is distributed on an 'AS IS' basis,
  ~ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  ~ for the specific language governing rights and limitations under the
  ~ License.
  ~
  ~ Copyright 2024 (C) OpenVPMS Ltd. All Rights Reserved.
  -->

<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">
    <parent>
        <artifactId>openvpms-sms</artifactId>
        <groupId>org.openvpms</groupId>
        <version>2.4.0.14-beta-2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>clickatell-openvpms-plugin</artifactId>
    <name>Clickatell OpenVPMS plugin</name>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-sms-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-plugin-services</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- NOTE: the following dependencies are embedded to work around  -->
        <!-- https://openvpms.atlassian.net/browse/OVPMS-2200              -->
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-ws-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-rest-client</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-archetypes</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-plugin-services-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openvpms</groupId>
            <artifactId>openvpms-sms-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${jdbc.groupId}</groupId>
            <artifactId>${jdbc.artifactId}</artifactId>
            <version>${jdbc.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <scope>test</scope>
            <classifier>standalone</classifier>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <exportScr>true</exportScr>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId};singleton:=true
                        </Bundle-SymbolicName>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                        <Export-Package>org.openvpms.clickatell.service;version="${project.version}"
                        </Export-Package>
                        <Bundle-Blueprint>OSGI-INF/blueprint/plugin.xml</Bundle-Blueprint>
                        <Import-Package>
                            javax.activation.*,
                            javax.annotation.*;version="[1,2)", <!-- needed by org.glassfish.jersey.internal.RuntimeDelegateImpl -->
                            javax.inject.*,
                            javax.xml.*,
                            javax.net.*,
                            javax.persistence.*,
                            org.apache.commons.lang3,
                            org.apache.commons.lang3.time,
                            org.openvpms.component.i18n,
                            org.openvpms.component.model.act,
                            org.openvpms.component.model.bean,
                            org.openvpms.component.model.entity,
                            org.openvpms.component.model.object,
                            org.openvpms.component.model.user,
                            org.openvpms.component.query,
                            org.openvpms.component.query.criteria,
                            org.openvpms.component.security.crypto,
                            org.openvpms.component.service.archetype,
                            org.openvpms.domain.party,
                            org.openvpms.sms.exception,
                            org.openvpms.sms.message,
                            org.openvpms.sms.service,
                            org.openvpms.plugin.service.archetype,
                            org.openvpms.plugin.service.config,
                            org.openvpms.plugin.service.util,
                            org.slf4j,
                            org.springframework.beans.factory;version="[5.0,6.0)",
                            org.w3c.dom.*,
                            org.xml.sax.*,
                        </Import-Package>
                        <Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
                        <Embed-Transitive>false</Embed-Transitive>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>