<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.kefirsf</groupId>
    <artifactId>kefirbb</artifactId>
    <version>1.5</version>
    <packaging>jar</packaging>

    <name>KefirBB</name>
    <description>
        KefirBB is a Java-library for text processing. Initially it was developed for BB2HTML translation.
        But flexible configuration allows to use it in different cases. For example for parsing Markdown, Textile,
        and for HTML filtration.
    </description>
    <url>http://kefirsf.org/kefirbb/</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/copyleft/lesser.html</url>
            <comments>An OSS license for libraries.</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git://github.com/kefirfromperm/kefirbb.git</connection>
        <developerConnection>scm:git:git@github.com:kefirfromperm/kefirbb.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://github.com/kefirfromperm/kefirbb</url>
    </scm>

    <developers>
        <developer>
            <id>kefir</id>
            <name>Vitalii Samolovskikh</name>
            <email>kefirfromperm@gmail.com</email>
            <url>http://www.linkedin.com/in/vsamolovskikh</url>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>5</timezone>
            <organization>Kefir Software Foundation</organization>
            <organizationUrl>http://kefirsf.org/</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <!-- There is only one dependency. For tests only. -->
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.13</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>${project.basedir}/src</sourceDirectory>
        <testSourceDirectory>${project.basedir}/test</testSourceDirectory>
        <resources>
            <!-- Default configurations -->
            <resource>
                <!-- This include everything else under src directory -->
                <directory>${project.build.sourceDirectory}</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <targetPath>${project.build.outputDirectory}</targetPath>
            </resource>

            <!-- Schema -->
            <resource>
                <directory>${project.basedir}/xml</directory>
                <targetPath>${project.build.outputDirectory}/META-INF/schema</targetPath>
            </resource>
        </resources>
        <testResources>
            <!-- Test configurations -->
            <testResource>
                <!-- This include everything else under test directory -->
                <directory>${project.build.testSourceDirectory}</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <targetPath>${project.build.testOutputDirectory}</targetPath>
            </testResource>
        </testResources>
        <plugins>
            <!-- Compile -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <verbose>true</verbose>
                    <fork>true</fork>
                    <executable>${JAVA_1_5_HOME}/bin/javac</executable>
                    <compilerVersion>1.5</compilerVersion>
                </configuration>
            </plugin>

            <!-- Create the manifest file -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifestEntries>
                            <Bundle-Copyright>Kefir Software Foundation (c) 2008-2015</Bundle-Copyright>
                            <Bundle-Description>A flexible text processor.</Bundle-Description>
                            <Bundle-DocURL>http://kefirsf.org/kefirbb/</Bundle-DocURL>
                            <Bundle-License>http://www.gnu.org/copyleft/lesser.html</Bundle-License>
                            <Bundle-Name>KefirBB</Bundle-Name>
                            <Bundle-SymbolicName>org.kefirsf.bb</Bundle-SymbolicName>
                            <Bundle-Vendor>Kefir Software Foundation</Bundle-Vendor>
                            <Bundle-Version>${project.version}</Bundle-Version>
                            <Export-Package>org.kefirsf.bb;version=${project.version}</Export-Package>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <!-- Add sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Compile javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <build>
                <plugins>
                    <!-- Sign artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>bintray</id>
            <url>https://api.bintray.com/maven/kefirsf/libs/org.kefirsf:kefirbb</url>
        </repository>
    </distributionManagement>
</project>