<?xml version="1.0" encoding="UTF-8"?>
<!--

    IRClib - A Java Internet Relay Chat library
    Copyright (C) 2006-2015 Christoph Schwering <schwering@gmail.com>
    and/or other contributors as indicated by the @author tags.

    This library and the accompanying materials are made available under the
    terms of the
     - GNU Lesser General Public License,
     - Apache License, Version 2.0 and
     - Eclipse Public License v1.0.
    This library is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY.

-->
<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.schwering</groupId>
    <artifactId>irclib</artifactId>
    <version>2.0.0.Alpha3</version>
    <packaging>bundle</packaging>

    <name>IRClib</name>
    <description>A Java Internet Relay Chat library</description>
    <url>http://moepii.sourceforge.net/</url>
    <inceptionYear>2006</inceptionYear>
    <licenses>
        <license>
            <name>The GNU Lesser General Public License, Version 2.1</name>
            <url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Eclipse Public License 1.0</name>
            <url>http://opensource.org/licenses/eclipse-1.0.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Christoph Schwering</name>
            <email>schwering@gmail.com</email>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>irclib-dev</name>
            <subscribe>irclib-dev@googlegroups.com</subscribe>
            <unsubscribe>irclib-dev-unsubscribe@googlegroups.com</unsubscribe>
            <archive>http://groups.google.com/group/irclib-dev/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:https://github.com/java-irclib/irclib.git</connection>
        <developerConnection>scm:git:git@github.com:java-irclib/irclib.git</developerConnection>
        <url>https://github.com/java-irclib/irclib</url>
        <tag>2.0.0.Alpha3</tag>
    </scm>
    <issueManagement>
        <url>https://github.com/java-irclib/irclib/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>
    <distributionManagement>
        <repository>
            <id>bintray</id>
            <url>https://api.bintray.com/maven/irclib/irclib/org.schwering:irclib</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <irclib.osgi.version>version=${project.version}</irclib.osgi.version>
        <irclib.osgi.export.pkg>
            org.schwering.irc.*
        </irclib.osgi.export.pkg>
        <irclib.osgi.import.pkg>
            !org.schwering.irc.*,
            *
        </irclib.osgi.import.pkg>
        <irclib.osgi.symbolic.name>${project.groupId}.${project.artifactId}</irclib.osgi.symbolic.name>
        <irclib.osgi.activator />
        <irclib.osgi.export>${irclib.osgi.export.pkg};${irclib.osgi.version}</irclib.osgi.export>
        <irclib.osgi.import>${irclib.osgi.import.pkg}</irclib.osgi.import>
        <irclib.osgi.dynamic />
        <irclib.osgi.private.pkg>!*</irclib.osgi.private.pkg>
        <irclib.osgi.failok>false</irclib.osgi.failok>
        <irclib.osgi.import.default.version>[$(version;==;$(@)),$(version;+;$(@)))</irclib.osgi.import.default.version>
        <irclib.osgi.exclude.dependencies>false</irclib.osgi.exclude.dependencies>

        <!-- Checkstyle and maven-checkstyle-plugin -->
        <version.com.puppycrawl.tools.checkstyle>6.1.1</version.com.puppycrawl.tools.checkstyle>
        <!-- the default value pointing at checkstyle.xml in hawkular-build-tools -->
        <checkstyle.configLocation>checkstyle.xml</checkstyle.configLocation>
        <checkstyle.consoleOutput>true</checkstyle.consoleOutput>
        <checkstyle.failOnError>true</checkstyle.failOnError>

        <!-- Maven plugin versions -->
        <version.maven-checkstyle-plugin>2.13</version.maven-checkstyle-plugin>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.0.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <header>${basedir}/license-header-template.txt</header>
                    <excludes>
                        <exclude>COPYING_*</exclude>
                        <exclude>RFC*</exclude>
                        <exclude>**/README</exclude>
                        <exclude>**/README.*</exclude>
                        <exclude>**/license-header-template.txt</exclude>
                        <exclude>**/*.html</exclude>
                        <exclude>**/*.htm</exclude>
                    </excludes>
                    <mapping>
                        <yaml>SCRIPT_STYLE</yaml>
                        <yml>SCRIPT_STYLE</yml>
                    </mapping>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.hawkular</groupId>
                        <artifactId>hawkular-build-tools</artifactId>
                        <version>7</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <!--<version>${felix-version}</version>-->
                <extensions>true</extensions>
                <configuration>
                    <excludeDependencies>${irclib.osgi.exclude.dependencies}</excludeDependencies>
                    <instructions>
                        <Extension-Name>org.schwering.irclib</Extension-Name>
                        <Implementation-Version>${project.version}</Implementation-Version>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Bundle-SymbolicName>${irclib.osgi.symbolic.name}</Bundle-SymbolicName>
                        <Bundle-Activator>${irclib.osgi.activator}</Bundle-Activator>
                        <Export-Package>${irclib.osgi.export}</Export-Package>
                        <Import-Package>${irclib.osgi.import}</Import-Package>
                        <DynamicImport-Package>${irclib.osgi.dynamic}</DynamicImport-Package>
                        <Private-Package>${irclib.osgi.private.pkg}</Private-Package>
                        <_versionpolicy>${irclib.osgi.import.default.version}</_versionpolicy>
                        <_failok>${irclib.osgi.failok}</_failok>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${version.maven-checkstyle-plugin}</version>
                <configuration>
                    <configLocation>${checkstyle.configLocation}</configLocation>
                    <consoleOutput>${checkstyle.consoleOutput}</consoleOutput>
                    <failsOnError>${checkstyle.failOnError}</failsOnError>
                    <useFile />
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${version.com.puppycrawl.tools.checkstyle}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>check-style</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <useReleaseProfile>true</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
