<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/**
 * Copyright (c) Codice Foundation
 *
 * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at
 * <http://www.gnu.org/licenses/lgpl.html>.
 *
 **/

 -->
<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>admin-core</artifactId>
        <groupId>ddf.admin.core</groupId>
        <version>2.30.0</version>
    </parent>
    <artifactId>admin-core-appservice</artifactId>
    <name>DDF :: Admin :: Core :: Application Service</name>
    <description>Exposes and application service that allows operations on DDF applications.
    </description>
    <packaging>bundle</packaging>
    <properties>
        <!-- UPDATE VERSION EACH TIME INTERFACE CHANGES -->
        <admin.core.appservice.api.version>2.0.0</admin.core.appservice.api.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.core</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.console</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.bundle</groupId>
            <artifactId>org.apache.karaf.bundle.core</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.system</groupId>
            <artifactId>org.apache.karaf.system.core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.classic.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ddf.admin.core</groupId>
            <artifactId>admin-core-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ddf.admin.core</groupId>
            <artifactId>admin-core-impl</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ddf.platform.util</groupId>
            <artifactId>platform-util</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.platform</groupId>
            <artifactId>sync-installer-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.aries</groupId>
            <artifactId>org.apache.aries.util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${javax.inject.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <version>${hamcrest-junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.npathai</groupId>
            <artifactId>hamcrest-optional</artifactId>
            <version>${hamcrest-optional.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>${jsonassert.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ddf.security.core</groupId>
            <artifactId>security-core-services</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Import-Package>
                            !org.codice.ddf.platform.util.http,
                            !com.sun.management,
                            *
                        </Import-Package>
                        <Export-Package>
                            org.codice.ddf.admin.application.service;version=${admin.core.appservice.api.version},
                            org.codice.ddf.admin.application.plugin;version=${admin.core.appservice.api.version},
                            org.codice.ddf.admin.application.service.command;version=${admin.core.appservice.api.version},
                            org.codice.ddf.admin.application.service.command.completers;version=${admin.core.appservice.api.version},
                            org.codice.ddf.admin.application.service.util;version=${admin.core.appservice.api.version},
                            org.apache.felix.utils.properties
                        </Export-Package>
                        <Private-Package>
                            org.codice.ddf.admin.application.rest,
                            org.codice.ddf.admin.application.rest.model,
                            org.codice.ddf.admin.application.service.impl
                        </Private-Package>
                        <Karaf-Commands>*</Karaf-Commands>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <haltOnFailure>true</haltOnFailure>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.0</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.0</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.0</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
