<?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>


   <groupId>com.colobu</groupId>
   <artifactId>rpcx</artifactId>
   <version>1.0</version>
   <packaging>jar</packaging>

   <name>Basic Maven Project</name>
   <description>A Maven project created from the library archetype.</description>
   <url>https://github.com/smallnest/rpcx-java</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>

   <scm>
      <connection>scm:git:https://github.com/smallnest/rpcx-java.git</connection>
      <developerConnection>scm:git:https://github.com/smallnest/rpcx-java.git</developerConnection>
      <tag>rpcx-1.0</tag>
      <url>https://github.com/smallnest/rpcx-java</url>
   </scm>

   <organization>
		<name>colobu</name>
		<url>http://colobu.com</url>
	</organization>
	<developers>
		<developer>
			<id>smallnest</id>
			<name>smallnest</name>
			<email>smallnest@gmail.com</email>
		</developer>
	</developers>
	
   <issueManagement>
      <system>GitHub</system>
      <url>https://github.com/smallnest/rpcx-java/issues</url>
   </issueManagement>

   <ciManagement>
      <system>Travis CI</system>
      <url>https://travis-ci.org/smallnest/rpcx-java</url>
      <notifiers />
   </ciManagement>

   <distributionManagement>
      <snapshotRepository>
         <id>sonatype-nexus-snapshots</id>
         <name>Sonatype Nexus Snapshots</name>
         <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
      <repository>
         <id>sonatype-nexus-staging</id>
         <name>Nexus Release Repository</name>
         <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
   </distributionManagement>


   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <java-version>1.8</java-version>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <sortpom.version>2.3.0</sortpom.version>

      <lombok.version>1.16.20</lombok.version>
      <commons-io.version>2.6</commons-io.version>
      <msgpack.version>0.8.14</msgpack.version>

      <junit.version>4.11</junit.version>
   </properties>


   <dependencies>
      <dependency>
         <groupId>commons-io</groupId>
         <artifactId>commons-io</artifactId>
         <version>${commons-io.version}</version>
      </dependency>
      <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>${lombok.version}</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.msgpack</groupId>
         <artifactId>msgpack-core</artifactId>
         <version>${msgpack.version}</version>
      </dependency>
      <dependency>
         <!-- JUnit -->
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>${junit.version}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <defaultGoal>clean package install</defaultGoal>
      <plugins>
         <!--<plugin>-->
            <!--<groupId>org.projectlombok</groupId>-->
            <!--<artifactId>lombok-maven-plugin</artifactId>-->
            <!--<version>1.16.20.0</version>-->
            <!--<executions>-->
               <!--<execution>-->
                  <!--<phase>generate-sources</phase>-->
                  <!--<goals>-->
                     <!--<goal>delombok</goal>-->
                  <!--</goals>-->
               <!--</execution>-->
            <!--</executions>-->
         <!--</plugin>-->
         <plugin>
            <groupId>com.google.code.sortpom</groupId>
            <artifactId>maven-sortpom-plugin</artifactId>
            <version>${sortpom.version}</version>
         </plugin>
         <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-release-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
               <checkModificationExcludes>
                  <checkModificationExclude>pom.xml</checkModificationExclude>
               </checkModificationExcludes>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.7</version>
            <configuration>
               <formats>
                  <format>html</format>
                  <format>xml</format>
               </formats>
               <check />
            </configuration>
         </plugin>
      </plugins>
   </build>


   <reporting>
      <plugins>
         <plugin>
            <!-- Checkstyle -->
            <!-- Checks that the source files comply with style standards -->
            <!-- It is using a customized rules file -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
               <!-- The customized rules file -->
               <configLocation>${project.basedir}/src/config/checkstyle/checkstyle-rules.xml</configLocation>
               <!-- Excludes generated code -->
               <excludes>**/generated/**/*</excludes>
            </configuration>
         </plugin>
         <plugin>
             <!-- FindBugs -->
             <!-- Checks for patterns which are prone to errors -->
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>findbugs-maven-plugin</artifactId>
             <configuration>
                 <!-- Exclusion patterns -->
                 <excludeFilterFile>${project.basedir}/src/config/findbugs/findbugs-exclude.xml</excludeFilterFile>
             </configuration>
         </plugin>
         <plugin>
            <!-- Javadoc -->
            <!-- Generates the javadocs -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
         </plugin>
         <plugin>
            <!-- PMD -->
            <!-- Checks that the code complies with a series of code quality rules -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <configuration>
               <rulesets>
                  <!-- The customized rules file -->
                  <ruleset>${project.basedir}/src/config/pmd/pmd-rules.xml</ruleset>
               </rulesets>
               <excludes>
                  <!-- Excludes generated code -->
                  <exclude>**/generated/**/*</exclude>
               </excludes>
            </configuration>
         </plugin>
      </plugins>
   </reporting>

   <profiles>
      <profile>
         <id>deployment</id>
         <properties>
            <maven.test.skip>true</maven.test.skip>
         </properties>
      </profile>
      <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.6</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

</project>
