<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>name.prokop.bart.rxtx</groupId>
    <artifactId>rxtx</artifactId>
    <version>2.2.2</version>
    <packaging>jar</packaging>

    <name>RXTX</name>
    <description>Serial port library for Java with embedded natives</description>
    <url>https://github.com/bartprokop/rxtx</url>
    
    <licenses>
        <license>
            <name>LGPL v 2.1</name>
            <url>http://www.gnu.org/licenses/lgpl.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Bartłomiej Prokop</name>
            <email>prokop.bart@gmail.com</email>
            <timezone>+1</timezone>
            <url>https://github.com/bartprokop</url>
        </developer>
    </developers>
    
    <scm>
        <connection>scm:git:git@github.com:bartprokop/rxtx.git</connection>
        <developerConnection>scm:git:git@github.com:bartprokop/rxtx.git</developerConnection>
        <url>https://github.com/bartprokop/rxtx</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>        
        <site>
            <id>bart.prokop.name</id>
            <url>ftp://ftp.internetdsl.pl/m2-sites/${project.artifactId}-${project.version}</url>
        </site>
    </distributionManagement>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>2.4</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <id>findbugs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>2.5.2</version>
                        <configuration>
                            <effort>Max</effort>
                            <!--<threshold>Low</threshold>-->
                            <threshold>Default</threshold> 
                            <xmlOutput>true</xmlOutput>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>compile</phase>
                                <goals>
                                    <!--<goal>check</goal>-->
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>                
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <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>            
<!--                    <plugin>
                        <artifactId>maven-jarsigner-plugin</artifactId>
                        <version>1.3.1</version>
                        <executions>
                            <execution>
                                <id>sign-code</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keystore>keystore.jks</keystore>
                            <alias>bart</alias>
                            <storepass>{Y6eQCL8G9d0HsxRdYQkHjaAutjWqtYG5uGSmn9IrRNFxPaDkq1mDVOo85mM/0Se6}</storepass>
                            <keypass>{SYWdkOASE6kHkvZV1cp3qcDL8KhxZn4f+y9RHhGqfE9WKGBldbItSIeE+jkihXmQ}</keypass>
                            <arguments>
                                <argument>-tsa</argument>
                                <argument>http://time.certum.pl/</argument>
                            </arguments>
                        </configuration>
                    </plugin>-->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.2</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>        
                    
                </plugins>                
            </build>
        </profile>
    </profiles>
</project>
