<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2020. www.sonsure.com Inc. All rights reserved.
  ~ You may obtain more information at
  ~
  ~   http://www.sonsure.com
  ~
  ~ Designed By Selfly Lee (selfly@live.com)
  -->

<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>com.sonsure</groupId>
    <artifactId>sonsure-commons</artifactId>
    <version>4.1.2</version>
    <packaging>bundle</packaging>

    <name>sonsure-commons</name>

    <description>Sonsure commons</description>
    <url>https://www.sonsure.com/</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>selfly</name>
            <email>selfly@foxmail.com</email>
        </developer>
    </developers>
    <scm>
        <connection>https://github.com/selfly/sonsure-commons</connection>
        <developerConnection>https://github.com/selfly/sonsure-commons</developerConnection>
        <url>https://github.com/selfly/sonsure-commons</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <slf4j-api.version>1.7.30</slf4j-api.version>
        <commons-lang3.version>3.12.0</commons-lang3.version>
        <snakeyaml.version>1.24</snakeyaml.version>
        <org.apache.servicemix.bundles.dom4j.version>2.1.1_1</org.apache.servicemix.bundles.dom4j.version>
        <lombok.version>1.18.10</lombok.version>
        <junit.version>4.12</junit.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeyaml.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
            <version>${org.apache.servicemix.bundles.dom4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>4.2.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
                        <Bundle-Vendor>The Sonsure Software</Bundle-Vendor>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>Sonsure工具包</Bundle-Name>
                        <Import-Package>
                            org.apache.commons.lang3,
                            org.apache.commons.lang3.builder,
                            org.slf4j;resolution:=optional,
                            org.yaml.snakeyaml;resolution:=optional,
                            org.xml.sax;resolution:=optional,,
                            org.dom4j;resolution:=optional,
                            org.dom4j.io;resolution:=optional
                        </Import-Package>
                        <Bundle-Activator></Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>

        <profile>
            <id>sonsure</id>
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>sonsure</id>
                    <url>http://192.168.50.2:8081/repository/maven-snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>sonsure</id>
                    <url>http://192.168.50.2:8081/repository/maven-releases/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

</project>