<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>ca.oson.json</groupId>
  <artifactId>oson</artifactId>
  <version>1.0.3</version>
  <packaging>jar</packaging>

  <name>Oson</name>
  <description>Java object to Json converter, to serialize Java object to Json string, and deserialize Json string to Java Object</description>
  <url>https://github.com/osonus/oson</url>
	
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>oson.ca</name>
    <url>http://oson.ca</url>
  </organization>

  <developers>
    <developer>
      <id>osonus</id>
      <name>David He</name>
      <url>http://oson.ca</url>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/osonus/oson</url>
    <connection>git@github.com:osonus/oson.git</connection>
  </scm>
	
  <build>
    <sourceDirectory>src</sourceDirectory>
	<plugins>

		<plugin>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.3</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-source-plugin</artifactId>
			<version>2.2.1</version>
			<executions>
				<execution>
					<id>attach-sources</id>
					<goals>
						<goal>jar-no-fork</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-javadoc-plugin</artifactId>
			<version>2.9.1</version>
			<configuration>
		        <charset>UTF-8</charset>
		        <docencoding>UTF-8</docencoding>
		        <docfilessubdirs>true</docfilessubdirs>
				<sourcepath>${basedir}/src/main/java/;${basedir}/src/test/java/</sourcepath>
				<links>
					<link>http://docs.oracle.com/javase/6/docs/api/</link>
				</links>
				<includePackageNames>ca.oson.json</includePackageNames>
				<excludePackageNames>ca.oson.json.gson:ca.oson.json.gson.functional</excludePackageNames>
			</configuration>
			<executions>
				<execution>
					<id>attach-javadocs</id>
					<goals>
						<goal>jar</goal>
					</goals>
				</execution>
			</executions>
		</plugin>

      <!-- Deploy test jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.5</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipIfEmpty>true</skipIfEmpty>
        </configuration>
      </plugin>

	</plugins>
  </build>
  
  <dependencies>
  	<dependency>
  		<groupId>javax.enterprise</groupId>
  		<artifactId>cdi-api</artifactId>
  		<version>2.0-EDR1</version>
  	</dependency>
	<dependency>
	    <groupId>com.google.code.gson</groupId>
	    <artifactId>gson</artifactId>
	    <version>2.6.2</version>
	</dependency>
	<dependency>
	    <groupId>com.fasterxml.jackson.core</groupId>
	    <artifactId>jackson-annotations</artifactId>
	    <version>2.7.4</version>
	</dependency>
	<dependency>
	    <groupId>com.fasterxml.jackson.core</groupId>
	    <artifactId>jackson-core</artifactId>
	    <version>2.7.4</version>
	</dependency>
	<dependency>
	    <groupId>com.fasterxml.jackson.core</groupId>
	    <artifactId>jackson-databind</artifactId>
	    <version>2.7.4</version>
	</dependency>
	<dependency>
	    <groupId>org.json</groupId>
	    <artifactId>json</artifactId>
	    <version>20160212</version>
	</dependency>
	<dependency>
	    <groupId>asm</groupId>
	    <artifactId>asm-all</artifactId>
	    <version>3.3.1</version>
	</dependency>

	<dependency>
	    <groupId>org.codehaus.jackson</groupId>
	    <artifactId>jackson-mapper-asl</artifactId>
	    <version>1.9.13</version>
	</dependency>

	<dependency>
	    <groupId>com.google.inject</groupId>
	    <artifactId>guice</artifactId>
	    <version>4.0</version>
	</dependency>

	<dependency>
	    <groupId>javassist</groupId>
	    <artifactId>javassist</artifactId>
	    <version>3.12.1.GA</version>
	</dependency>

	<dependency>
	    <groupId>javax.persistence</groupId>
	    <artifactId>persistence-api</artifactId>
	    <version>1.0.2</version>
	</dependency>

	<dependency>
	    <groupId>javax.validation</groupId>
	    <artifactId>validation-api</artifactId>
	    <version>1.1.0.Final</version>
	</dependency>

	<dependency>
	    <groupId>junit</groupId>
	    <artifactId>junit</artifactId>
	    <version>4.12</version>
	</dependency>

  </dependencies>

  <profiles>
    <!-- To deploy to OSSRH: mvn clean deploy -P release -->
    <profile>
      <id>release</id>

      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>

      <build>
        <plugins>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </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>