<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
  ~ and is available at http://www.eclipse.org/legal/epl-v10.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>org.opendaylight.odlparent</groupId>
        <artifactId>bundle-parent</artifactId>
        <version>9.0.8</version>
        <relativePath/>
    </parent>

    <groupId>org.opendaylight.netconf</groupId>
    <artifactId>shaded-exificient</artifactId>
    <packaging>bundle</packaging>
    <version>2.0.7</version>
    <name>${project.artifactId}</name>

    <properties>
        <!-- We are just juggling classes here -->
        <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
        <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>

        <!-- We do not want to generate javadoc -->
        <maven.javadoc.skip>true</maven.javadoc.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.opendaylight.netconf</groupId>
            <artifactId>shaded-exificient-jar</artifactId>
            <version>2.0.7</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.opendaylight.netconf</groupId>
                                    <artifactId>shaded-exificient-jar</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <includeArtifactIds>shaded-exificient-jar</includeArtifactIds>
                            <outputDirectory>${project.build.directory}/shaded-sources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/shaded-sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>
                            sun.io;resolution:=optional,
                            *
                        </Import-Package>
                        <Export-Package>
                            org.opendaylight.netconf.shaded.*
                        </Export-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
