<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/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.github.drinkjava2</groupId>
 <artifactId>jsqlbox</artifactId>
 <packaging>jar</packaging>
 <version>4.0.6.jre8</version>
 
 <name>jSqlBox</name>
 <description>jSqlBox is a full function DAO tool</description>
 <url>https://github.com/drinkjava2/jsqlbox</url>
  
 <issueManagement>
    <system>Github Issue</system>
    <url>https://github.com/drinkjava2/jsqlbox/issues</url>
 </issueManagement>

 <licenses>
   <license>
     <name>The Apache Software License, Version 2.0</name>
     <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
   </license>
 </licenses>

 <developers>
   <developer>
     <name>Yong Zhu</name>
     <email>yong9981@gmail.com</email>
     <url>https://github.com/drinkjava2/</url>
   </developer>
 </developers>

 <scm>
   <connection>scm:git@github.com:drinkjava2/jsqlbox.git</connection>
   <developerConnection>scm:git@github.com:drinkjava2/jsqlbox.git</developerConnection>
   <url>git@github.com:drinkjava2/jsqlbox.git</url>
 </scm>

 <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding> 
        <!-- Release on Java8 -->
        <version.java>1.8</version.java>
        <version.javadoc>8</version.javadoc>
        <version.compiler-plugin>3.3</version.compiler-plugin>
        <version.war-plugin>2.6</version.war-plugin>
        <version.clean-plugin>3.0.0</version.clean-plugin>
        <version.resources-plugin>2.7</version.resources-plugin>
        <version.surefire-plugin>2.19</version.surefire-plugin>
        <version.jar-plugin>2.6</version.jar-plugin>
        <version.source-plugin>2.4</version.source-plugin>
        <version.javadoc-plugin>2.10.3</version.javadoc-plugin>
        <version.gpg-plugin>1.6</version.gpg-plugin> 
 </properties> 
 
 

 <dependencies>   
    <!-- JUnit for unit test -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
     
    <!-- HikariCP Java8 datasource pool -->
    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>  <!-- Java6 release is HikariCP-java6 -->
      <version>3.4.2</version>  <!-- Java6 relese is 2.3.13 -->
      <scope>test</scope>
    </dependency>  
    
   <!-- H2 Memory database for unit test -->
   <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.3.176</version>
      <scope>test</scope>
   </dependency> 
    
   <!-- MySql JDBC driver -->
   <!--dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.43</version>
      <scope>test</scope>
   </dependency-->
    
   <!-- Ugly Oracle JDBC jar need manually add into maven, ojdbc6.jar can found in Oracle 
       install folder, then copy to C:\ and use below command to install to maven:
     mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar -Dfile=C:\ojdbc6.jar -->
   <!--dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc6</artifactId>
      <version>11.2.0</version>
      <scope>test</scope>
   </dependency--> 
	
   <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
   <!--dependency>
      <groupId>com.microsoft.sqlserver</groupId>
      <artifactId>mssql-jdbc</artifactId>
      <version>6.1.0.jre8</version>
      <scope>test</scope>
   </dependency--> 
    
 </dependencies>
  
 
 
 <build>  
      <plugins>  

       <plugin> <!-- add java class in resources folder to support multiple String, i.e. Text -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.12</version>
        <executions> 
         
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/main/resources</source>
              </sources>
            </configuration>
          </execution>  
            
            <execution>
              <id>add-test-source</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-test-source</goal>
              </goals>
              <configuration>
                <sources>
                    <source>src/test/resources</source>
              </sources>
              </configuration>
            </execution> 
    
        </executions>
      </plugin> 


       <plugin> <!-- compile -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.compiler-plugin}</version>
                <configuration>
                    <source>${version.java}</source>
                    <target>${version.java}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>  
       </plugins>       
</build> 
    
        <profiles>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.source-plugin}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>true</attach>
                            <encoding>UTF-8</encoding>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.javadoc-plugin}</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <links>
                                <link>http://docs.oracle.com/javase/${version.javadoc}/docs/api</link>
                            </links>
                                        <!-- Close doc check, for Java6 only -->
					<!--properties>
						<javadoc.opts>-Xdoclint:none</javadoc.opts>
					</properties-->
							
                                       <!-- Close doc check, for Java8 only -->
                                       <additionalparam>-Xdoclint:none</additionalparam>  
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.gpg-plugin}</version>
                        <executions>
                            <execution>
                                <phase>install</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
			   <!-- Release, if is offical verison, will release to centre lib, if is "-SNAPSHOT" version, 
			        will release to sanpshot site, but they use same command:
					"mvn clean deploy -P release -Dgpg.passphrase=yourGPGpwd"
			   -->	
              <snapshotRepository>
                 <id>oss</id>
                 <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
              </snapshotRepository>
              <repository>
                 <id>oss</id>
                 <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
              </repository>
           </distributionManagement>
        </profile>
		
    </profiles> 

</project>
