<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
 Copyright (c) 2019 PANTHEON.tech. 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>odlparent</artifactId>
        <version>5.0.3</version>
        <relativePath>../../odlparent</relativePath>
    </parent>

    <artifactId>leveldbjni-all</artifactId>
    <name>ODL :: odlparent :: ${project.artifactId}</name>
    <packaging>jar</packaging>

    <properties>
        <!-- Repackaged third-party code, implies questionable code quality -->
        <odlparent.checkstyle.skip>true</odlparent.checkstyle.skip>
        <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
        <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
    </properties>

    <build>
        <plugins>
            <!-- We do not want to compile anything -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <!-- Third-party code: disable license check -->
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-license</id>
                        <configuration>
                            <excludes>
                                org/fusesource/leveldbjni/All.java
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-jar</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <!--
                                    This jar has been manually seeded a long time ago and is also available here:
                                    https://nexus.opendaylight.org/service/local/repositories/thirdparty/content/org/fusesource/leveldbjni/leveldbjni-all/1.8-odl/leveldbjni-all-1.8-odl.jar
                                -->
                                <unjar src="${project.basedir}/leveldbjni-all-1.8-odl.jar" dest="${project.build.outputDirectory}"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
                            <Bundle-SymbolicName>org.opendaylight.odlparent.leveldbjni-all</Bundle-SymbolicName>
                            <Bundle-Vendor>OpenDaylight</Bundle-Vendor>
                            <Bundle-Version>1.8.0</Bundle-Version>
                            <Implementation-Title>LevelDB JNI</Implementation-Title>
                            <Implementation-Version>1.8-odl</Implementation-Version>
                            <Bundle-License>http://www.opensource.org/licenses/BSD-3-Clause</Bundle-License>
                            <Bundle-Name>leveldbjni-all</Bundle-Name>
                            <Bundle-NativeCode>
                                META-INF/native/windows32/leveldbjni.dll;osname=Win32;processor=x86,META-INF/native/windows64/leveldbjni.dll;osname=Win32;processor=x86-64,META-INF/native/osx/libleveldbjni.jnilib;osname=macosx;processor=x86,META-INF/native/osx/libleveldbjni.jnilib;osname=macosx;processor=x86-64,META-INF/native/linux32/libleveldbjni.so;osname=Linux;processor=x86,META-INF/native/linux64/libleveldbjni.so;osname=Linux;processor=x86-64,META-INF/native/sunos64/amd64/libleveldbjni.so;osname=SunOS;processor=x86-64,META-INF/native/sunos64/sparcv9/libleveldbjni.so;osname=SunOS;processor=sparcv9
                            </Bundle-NativeCode>
                            <Embed-Dependency>*;groupId=org.fusesource.leveldbjni;inline=META-INF/native/*,</Embed-Dependency>
                            <Embed-Transitive>true</Embed-Transitive>
                            <Export-Package>org.fusesource.leveldbjni;uses:="org.iq80.leveldb";version="1.8",org.iq80.leveldb;version="0.6"</Export-Package>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <scm>
        <connection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</connection>
        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/odlparent.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://wiki.opendaylight.org/view/ODL_Root_Parent:Main</url>
    </scm>
</project>
