<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2009-2016 Dmytro Pishchukhin (http://knowhowlab.org)
  ~
  ~ Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<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>

    <groupId>org.knowhowlab.osgi</groupId>
    <artifactId>sigar</artifactId>
    <version>1.6.5_01</version>
    <packaging>bundle</packaging>

    <name>Hyperic Sigar OSGi bundle</name>
    <description>Hyperic Sigar OSGi bundle</description>

    <url>http://knowhowlab.org</url>

    <developers>
        <developer>
            <name>Dmytro Pishchukhin</name>
            <timezone>GMT+1</timezone>
        </developer>
    </developers>

    <organization>
        <name>Know-How Lab</name>
        <url>http://knowhowlab.org</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:knowhowlab/org.knowhowlab.osgi.sigar.git</connection>
        <url>scm:git:git@github.com:knowhowlab/org.knowhowlab.osgi.sigar.git</url>
        <developerConnection>scm:git:git@github.com:knowhowlab/org.knowhowlab.osgi.sigar.git</developerConnection>
        <tag>1.6.5_01</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.hyperic</groupId>
            <artifactId>sigar</artifactId>
            <version>1.6.5</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/sigar.jar</systemPath>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            org.hyperic.sigar.*;version=1.6.5
                        </Export-Package>
                        <Import-Package>
                            !junit*,
                            !javax.management,
                            !org.apache.tools.ant*
                            *
                        </Import-Package>
                        <Embed-Dependency>*;scope=system;type=!pom;inline=true;artifactId=sigar</Embed-Dependency>
                        <Bundle-NativeCode>
                            libsigar-arm-linux.so;osname=Linux;processor=ARM,
                            libsigar-x86-linux.so;osname=Linux;processor=i386;processor=x86,
                            libsigar-amd64-linux.so;osname=Linux;processor=x86_64,
                            libsigar-universal64-macosx.dylib;osname=macosx;processor=x86_64,
                            sigar-amd64-winnt.dll;osname=Windows7;osname=Windows8;osname=Windows10;processor=x86_64,
                            sigar-x86-winnt.dll;osname=Windows7;osname=Windows8;osname=Windows10;processor=x86
                        </Bundle-NativeCode>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.5.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
