<?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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>5</version>
    </parent>

    <groupId>com.ning</groupId>
    <artifactId>ning-api-java</artifactId>
    <packaging>bundle</packaging>
    <version>0.5.1</version>
    <name>ning-api-java</name>
  <description>Java client library for accessing Ning external API
</description>
    <scm>
        <connection>scm:git:git@github.com:ning/ning-api-java.git</connection>
        <developerConnection>scm:git:git@github.com:ning/ning-api-java.git</developerConnection>
    <url>http://github.com/ning/ning-api-java</url>    
    </scm>
    <developers>
        <developer>
            <id>tatu</id>
            <name>Tatu Saloranta</name>
            <email>tatu@ning.com</email>
        </developer>
    </developers>
    <prerequisites>
        <maven>2.2.1</maven>
    </prerequisites>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <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>
    <organization>
     <name>Ning.com</name>
     <url>http://www.ning.com</url>
    </organization>

    <dependencies>
        <!-- Third party -->

        <!-- http client for communication -->
        <dependency>
             <groupId>com.ning</groupId>
             <artifactId>async-http-client</artifactId>
             <version>1.6.1</version>
        </dependency>
        <!-- Jackson for JSON handling -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.6.2</version>
        </dependency>

        <!-- Joda for date/times -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>1.6</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.11</version>
            <classifier>jdk15</classifier>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
      <plugins>
        <!-- Compilation: require JDK 1.6 -->
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>  
          <configuration>
            <source>1.6</source>  
            <target>1.6</target>  
          </configuration>  
        </plugin>
        <!-- Also build source jar -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Need to provide javadocs -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.6</version>
          <configuration>
              <encoding>UTF-8</encoding>
              <links>
                  <link>http://java.sun.com/javase/6/docs/api/</link>
              </links>
          </configuration>
          <executions>
              <execution>
                  <id>attach-javadocs</id>
                  <phase>verify</phase>
                  <goals>
                      <goal>jar</goal>
                  </goals>
              </execution>
          </executions>
        </plugin>
        <!-- Plus, let's make jars OSGi bundles as well  -->
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <extensions>true</extensions>
          <configuration>
            <instructions>
              <Bundle-Name>${project.name}</Bundle-Name>
              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
              <Bundle-Description>${project.description}</Bundle-Description>
              <Import-Package>
javax.crypto, javax.crypto.spec,              
com.ning.http.client,
com.ning.http.util,
org.codehaus.jackson,
org.codehaus.jackson.annotate,
org.codehaus.jackson.map,
org.codehaus.jackson.map.deser,
org.codehaus.jackson.map.type,
org.codehaus.jackson.type,
org.joda.time
</Import-Package>
              <DynamicImport-Package>
</DynamicImport-Package>
              <Private-Package>
</Private-Package>
              <Export-Package>
com.ning.api.client*
</Export-Package>
            </instructions>
          </configuration>
        </plugin>
        <!-- Need GPG signatures for releases -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.0</version>
          <configuration>
            <mavenExecutorId>forked-path</mavenExecutorId>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <includes>
              <include>**/*Test.java</include>
              <include>**/*TestCase.java</include>
              <include>**/*TestCases.java</include>
            </includes>
            <excludes>
              <exclude>**/*$*</exclude>
            </excludes>
            <reportFormat>${surefire.format}</reportFormat>
            <useFile>${surefire.usefile}</useFile>
            <forkMode>${surefire.fork.mode}</forkMode>
            <childDelegation>false</childDelegation>
            <argLine>${surefire.fork.vmargs}</argLine>
            <systemProperties>
              <property>
                <name>java.awt.headless</name>
                <value>${java.awt.headless}</value>
              </property>
              <property>
                <name>surefire.fork.vmargs</name>
                <value>${surefire.fork.vmargs}</value>
              </property>
            </systemProperties>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
	  <executions>
	    <execution>
	      <goals>
	        <goal>test-jar</goal>
	      </goals>
	    </execution>
	  </executions>
          <configuration>
            <archive>
              <manifest>
                <mainClass>com.sun.msv.driver.textui.Driver</mainClass>
              </manifest>
            </archive>
          </configuration>
        </plugin>
      </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- NOTE: repositories from parent POM -->

</project>
