<?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>xyz.cofe</groupId>
        <artifactId>root</artifactId>
        <version>0.1-SNAPSHOT</version>
    </parent> -->
    
    <groupId>xyz.cofe</groupId>
    <artifactId>common</artifactId>
    <version>0.2.2</version>
    <packaging>jar</packaging>
    
    <name>common</name>
    <description>common lib for any platform</description>
    <url>https://github.com/gochaorg/cofe.xyz</url>

    <licenses>
      <license>
        <name>MIT License</name>
        <url>http://www.opensource.org/licenses/mit-license.php</url>
      </license>
    </licenses>
    
    <developers>
        <developer>
          <name>Georgiy P Kamnev</name>
          <email>nt.gocha@gmail.com</email>
          <!-- <organization>-none-</organization> -->
          <!-- <organizationUrl>http://www.sonatype.com</organizationUrl> -->
        </developer>
    </developers>

    <scm>
      <connection>scm:git:git://github.com/gochaorg/cofe.xyz.git</connection>
      <developerConnection>scm:git:ssh://github.com:gochaorg/cofe.xyz.git</developerConnection>
      <url>http://github.com/gochaorg/cofe.xyz/tree/master</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
            <version>1.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-java7</artifactId>
            <version>2.4.13</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>6.2.1.jre7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.21</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>1.7.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Поддержка junit -->
            <!-- <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18</version>
            </plugin> -->
            
            <!-- Поддержка Service Provider Interfaces -->
            <plugin>
                <groupId>eu.somatik.serviceloader-maven-plugin</groupId>
                <artifactId>serviceloader-maven-plugin</artifactId>
                <version>1.1.0</version>
                <configuration>
                  <services>
                    <param>xyz.cofe.types.spi.ConvertToStringService</param>
                    <param>xyz.cofe.types.spi.ConvertToValueService</param>
                    <param>xyz.cofe.typeconv.spi.GetTypeConvertor</param>
                    <param>xyz.cofe.fs.spi.OSFileSystemService</param>
                    <param>xyz.cofe.sql.ConnectionPoolService</param>
                    <!--<param>xyz.cofe.sql.DataSourcesStorage</param>-->
                  </services>
                </configuration>
                <executions>
                  <execution>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>
            
            <!-- Копиляция -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                </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>
            
            <!-- Документация java исходников -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        
        <testResources>
            <testResource>
                <directory>${project.basedir}/src/test/java</directory>
            </testResource>
        </testResources>
    </build>
    
    <profiles>
        <profile>
            <id>pub-sonatype</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>
                    <!-- Поддержка junit -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.15</version>
                    </plugin>

                    <!-- Поддержка Service Provider Interfaces -->
                    <plugin>
                        <groupId>eu.somatik.serviceloader-maven-plugin</groupId>
                        <artifactId>serviceloader-maven-plugin</artifactId>
                        <version>1.1.0</version>
                        <configuration>
                          <services>
                            <param>xyz.cofe.types.spi.ConvertToStringService</param>
                            <param>xyz.cofe.types.spi.ConvertToValueService</param>
                            <param>xyz.cofe.typeconv.spi.GetTypeConvertor</param>
                            <param>xyz.cofe.fs.spi.OSFileSystemService</param>
                            <param>xyz.cofe.sql.ConnectionPoolService</param>
                            <!--<param>xyz.cofe.sql.DataSourcesStorage</param>-->
                          </services>
                        </configuration>
                        <executions>
                          <execution>
                            <goals>
                              <goal>generate</goal>
                            </goals>
                          </execution>
                        </executions>
                    </plugin>

                    <!-- Копиляция -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                            <showDeprecation>true</showDeprecation>
                        </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>
                    
                    <!-- Документация java исходников -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <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>

                    <!-- Публикация в oss.sonatype.org -->
                    <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>
                </plugins>

                <testResources>
                    <testResource>
                        <directory>${project.basedir}/src/test/java</directory>
                    </testResource>
                </testResources>
            </build>
        </profile>
    </profiles>
</project>