<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 The Java Tool Project
  ~
  ~ The Java Tool Project licenses this file to you under the Apache License,
  ~ version 2.0 (the "License"); you may not use this file except in compliance
  ~ with the License. You may obtain a copy of the License at:
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  ~ License for the specific language governing permissions and limitations
  ~ under the License.  
  -->
<!-- history 

0.9
- Provide better support for Iterator and Enumeration
- Move CacheService interface from osgl-cache to osgl-tool
- #2: add C.List.split(Predicate) function
- #3: Add KVStore.toMap() method
- Add IO.loadProperties(File) method
- Add IO.loadProperties(InputStream) method
- Add IO.loadProperties(String) method
- Add IO.loadProperties(Reader) method
- Add BigDecimalValueObjectCodec
- Fix ValueObject.toJSONString() issue when type is String and content contains illegal character, .e.g (")
- Fix issue in S.COMMON_SEP, change "[,;:\\s]" to "[,;:\\s]+"
- Add $.F.identity(Class) method
- Add Keyword utility
- Add N.isPerfectSquare(long) method
- Add $.IS_SERVER flag
- Add $.IS_64 flag
- Add FastStr.of(byte[], String) factory method
- Add IO.readLine(xxx, int limit) APIs to allow read limit lines from file/inputstream/reader
- Crypto encrypt and decrypt methods now accept byte[] as key and salt
- Add $.fieldOf(Class, String, Boolean) method
- Make Const class implement Serializable
- Add $.getMethod(Class, String, Class[]) method

0.8
- Rename "_" to "O" as "$" will be an illegal identifier after Java 8
- Increase unit test coverage
- Improve JavaDoc quality

0.7.0-SNAPSHOT
- _.newInstance(String) now will pass the Caller's class loader
- rename C.List.sort to C.List.sorted to avoid conflict with Java 8 List.sort
- rename StrBase.chars - StrBase.charArray to avoid conflict with Java 8 CharSequence.chars
- Add static T NPE(T) to osgl (_) class
- Add encodeUrlSafeBase64 and decodeUrlSafeBase64 method to Codec
- Add genSecret, genRandomDigit, genRandomStr to Crypto

0.7.1-SNAPSHOT
- Fix issue _.newInstance(...) failure when there are overloaded constructor with first parameter type is the same
- Add T _.async(_.F0<T>, long)
- Add N.round(float, int) and N.round(double, int) method
- Add C.Sequence.count(T) method

0.6.0-SNAPSHOT
- Add S.uuid() method
- Add new reader() and is() method to IO class dealing with URL and InputStreamReader
- Add eq2(Object, Object) to _, to allow do equal matching against two arrays
- Add asPrimitive() method set to _, to allow convert Object array to primitive array
- Add toString2() to _ to output array type object in a good format
- Add COMMON_SEP to S; add SPLIT and split(String) to S.F
- Better handling of primitive types in S.newInstance and S.classForName
- S.builder now accept primitive types and object types as constructor; original S.builder(int) semantic is now expressed in S.sizedBuilder(int)
- Add append(String) and prepend(String) functor to S.F
- Add reverse(array) methods to _
- add doFillInStackTrace to FastRuntimeException
- Fix issue: S.capFirst() throw StringIndexOutfBoundsException when parameter is empty string
- C.List.insert() now accept negative number to count the insert position from tail to head
- Add _.nil() method

0.5.5-SNAPSHOT
- Add C.List.unique(Comparator<T>) method

0.5.4-SNAPSHOT
- support primitives in _.forClassName and _.newInstace methods

0.5.3-SNAPSHOT
- add CONTAINS and contains to S.F

0.5.2-SNAPSHOT
- add random(List list) to _

0.5.1-SNAPSHOT
- Enhance Crypto encrypt/decrypt algorithm

0.5.0-SNAPSHOT
- _.Var implements _.Func0 so we can use it to implement "constant function" that
  takes a value and returns it when needed

0.4.5-SNAPSHOT
- ListBase.unique not working as expected

0.4.4-SNAPSHOT
- C.list(List) shouldn't sort the list
- Add S.F.IS_BLANK function
- Add S.F.NULL_SAFE function

0.4.3-SNAPSHOT
- Fix FeatureBase::setFeature NPE issue

0.4.2-SNAPSHOT
- Add "unique" to "C.List"
- remove "generalVisitor(final Function<? super T, ?> f)" from "_".
  "_.visitor(final Function<? super T, ?> f)" should be used instead

0.4.1-SNAPSHOT
- Add "public static ISObject zip(ISObject... objects)" method to IO utiltiy class

0.4-SNAPSHOT
- S.empty(String) now do not trim the string being passed in,
- Added S.blank(String) with the same semantic of previous S.empty(String)
- Fixed FastStr trim issue when begin, end pointer is not at default position
- FastStr now works with Java 6
- Unsafe now works with Java 6
- C enhancements:
** Set: add withIn, without, onlyIn for set operations
** added new set() method allows passing an collection to prepopulate the set
- OSGL updates:
** new classForName method allows passing class loader to load the class
- Iterators now is public class
- ListBuilder's new factor method allows passing initial capacity parameter

0.3.1-SNAPSHOT
- Added: ContextLocal, FastStr, Unsafe

0.3-SNAPSHOT
- base version when history log started
-->
<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>org.osgl</groupId>
  <artifactId>osgl-tool</artifactId>
  <packaging>jar</packaging>
  <version>0.9.2</version>

  <name>Java Tool</name>
  <description>A simple Java toolkit</description>
  <url>http://java-tool.osgl.org/</url>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <scm>
    <connection>scm:git:git://github.com/osglworks/java-tool.git</connection>
    <developerConnection>scm:git:git@github.com:osglworks/java-tool.git</developerConnection>
    <url>git://github.com/osglworks/java-tool.git</url>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    <maven.test.skip>false</maven.test.skip>
  </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>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <encoding>UTF-8</encoding>
            <debuglevel>lines,vars,source</debuglevel>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-eclipse</artifactId>
              <version>1.8.4</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <configuration>
            <includePom>true</includePom>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.8</version>
    </dependency>

    <dependency>
      <groupId>com.carrotsearch</groupId>
      <artifactId>junit-benchmarks</artifactId>
      <version>0.7.2</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.osgl</groupId>
      <artifactId>osgl-storage</artifactId>
      <version>0.2</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.osgl</groupId>
          <artifactId>osgl-tool</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.3</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.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2</version>
            <configuration>
              <descriptors>
                <descriptor>${basedir}/assembly-dist.xml</descriptor>
              </descriptors>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>${basedir}/assembly-dist.xml</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9</version>
            <configuration>
              <stylesheetfile>src/etc/javadoc.css</stylesheetfile>
              <quiet />
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <executions>
              <execution>
                <id>gen-javadoc</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>javadoc</goal>
                </goals>
                <configuration>
                  <failOnError>false</failOnError>
                </configuration>
              </execution>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration> <!-- add this to disable checking -->
                  <failOnError>false</failOnError>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <configuration>
              <header>src/etc/header.txt</header>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
