<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * 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>
        <groupId>ddf.thirdparty</groupId>
        <artifactId>thirdparty</artifactId>
        <version>2.30.1</version>
    </parent>

    <artifactId>restito</artifactId>
    <name>DDF :: Thirdparty :: RESTITO</name>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>com.xebialabs.restito</groupId>
            <artifactId>restito</artifactId>
            <version>${restito.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.mina</groupId>
            <artifactId>mina-core</artifactId>
            <version>2.2.4</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.grizzly</groupId>
            <artifactId>grizzly-http-server</artifactId>
            <version>2.3.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${project.groupId}.${project.artifactId}
                        </Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Embed-Transitive>true</Embed-Transitive>
                        <Embed-Dependency>*;scope=!test</Embed-Dependency>
                        <Export-Package>
                            org.glassfish.grizzly.http.*,
                            com.xebialabs.restito.builder.ensure,
                            com.xebialabs.restito.builder.stub,
                            com.xebialabs.restito.builder.verify,
                            com.xebialabs.restito.resources,
                            com.xebialabs.restito.semantics,
                            com.xebialabs.restito.server,
                            com.xebialabs.restito.server.secure,
                            com.xebialabs.restito.support.behavior,
                            com.xebialabs.restito.support.junit,
                            com.xebialabs.restito.support.log
                        </Export-Package>
                        <!-- This is not a good practice DO NOT use *;resolution:=optional in any
                        code that will touch production that being said this is a bundle that
                        is only used in test-->
                        <Import-Package>
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-artifact-size</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <ArtifactSizeEnforcerRule implementation="org.codice.maven.artifactsize.ArtifactSizeEnforcerRule">
                                    <maxArtifactSize>5.1_MB</maxArtifactSize>
                                </ArtifactSizeEnforcerRule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Need to have JaCoCo plugin otherwise surefire fails because ${argLine} is undefined -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
