<?xml version="1.0" encoding="UTF-8"?>
<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>net.freeutils</groupId>
        <artifactId>parent</artifactId>
        <version>1.0</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>jcharset</artifactId>
    <version>2.1</version>
    <packaging>jar</packaging>

    <name>JCharset</name>
    <description>The Java Charset package</description>
    <url>http://www.freeutils.net/source/jcharset/</url>
    <licenses>
        <license>
            <name>GNU General Public License (GPL), Version 2.0</name>
            <url>http://www.gnu.org/licenses/gpl-2.0.html</url>
        </license>
        <license>
            <name>Commercial License</name>
            <url>LICENSE.commercial.txt</url>
        </license>
    </licenses>

    <properties>
        <jdk.version>1.5</jdk.version>
        <animal.sniffer.jdk.version>java15</animal.sniffer.jdk.version>
        <skip.assembly>false</skip.assembly>
    </properties>

    <build>
        <plugins>
            <!-- make it an OSGi bundle (override parent config to add SPI capability) -->
            <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>
                        <configuration>
                            <instructions>
                                <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
                                <Bundle-Version>${project.version}</Bundle-Version>
                                <Export-Package>${bundle.namespace}.*;version="${project.version}"</Export-Package>
                                <Private-Package>${bundle.namespace}.*</Private-Package>
                                <!-- specify provided SPI capability-->
                                <!-- (no Require-Capability since the package can also be used without SPI) -->
                                <Provide-Capability>osgi.serviceloader; osgi.serviceloader=java.nio.charset.spi.CharsetProvider</Provide-Capability>
                            </instructions>
                            <supportedProjectTypes>
                                <supportedProjectType>jar</supportedProjectType>
                            </supportedProjectTypes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <!-- use the generated bundle manifest -->
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                    <archive>
                        <manifest>
                            <mainClass>net.freeutils.charset.Utils</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
