<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>me.legrange</groupId>
    <artifactId>panstamp</artifactId>
    <version>2.2</version>
    <packaging>jar</packaging>

    <name>panStamp Device Library</name>
    <description>A Java library for working with a network of panStamp Arduino devices</description>
    <url>https://github.com/GideonLeGrange/panstamp-java</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>GideonLeGrange</id>
            <name>Gideon le Grange</name>
            <email>gideon@legrange.me</email>
        </developer>
    </developers>
    <scm>
        <url>git@github.com:GideonLeGrange/panstamp-java.git</url>
        <connection>scm:git:git@github.com:GideonLeGrange/panstamp-java.git</connection>
        <developerConnection>scm:git:git@github.com:GideonLeGrange/panstamp-java.git</developerConnection>
    </scm>    
    <build>
        <plugins>
            <plugin>
                
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin> 
                <groupId>org.apache.maven.plugins</groupId> 
                <artifactId>maven-jar-plugin</artifactId> 
                <version>2.3.2</version>
                <executions> 
                    <execution> 
                        <id>default-jar</id>
                        <phase>package</phase> 
                        <goals> 
                            <goal>jar</goal> 
                        </goals> 
                        <configuration> 
                            <excludes> 
                                <exclude>**/examples</exclude> 
                                <exclude>**/examples/*</exclude> 
                            </excludes> 
                        </configuration> 
                    </execution> 
                </executions> 
            </plugin>
        </plugins>    
        <resources>
            <resource>
                <targetPath>devices</targetPath>
                <filtering>false</filtering>
                <directory>${basedir}/src/main/resources/devices</directory>
            </resource>
        </resources>    
    </build>
    
    <profiles>
        <profile> 
            <id>release</id>
            <build>
                <plugins>
                    <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>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.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.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.5</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>  
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>    

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.bidib.com.neuronrobotics</groupId>
            <artifactId>nrjavaserial</artifactId>
            <version>3.9.3.1</version>
        </dependency>
    </dependencies>
</project>
