Skip to content

Commit

Permalink
Merge branch 'develop' into develop-s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanpkc committed Jun 16, 2015
2 parents 61691b8 + 2902c04 commit 3113ffb
Show file tree
Hide file tree
Showing 45 changed files with 4,714 additions and 3,876 deletions.
6 changes: 0 additions & 6 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.jdt.ui.prefs

This file was deleted.

9 changes: 0 additions & 9 deletions .settings/org.maven.ide.eclipse.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile.common
@@ -1,6 +1,6 @@
TARGET:=target
SRC:=src/main/java
include $(SRC)/org/xerial/snappy/VERSION
include src/main/resources/org/xerial/snappy/VERSION

ifndef JAVA_HOME
$(error Set JAVA_HOME environment variable)
Expand Down
15 changes: 11 additions & 4 deletions Milestone.md
@@ -1,9 +1,16 @@
## Features under consideration
* `SnappyIndexer` for parallel compression/decompression
* CUI commands (snap/unsnap)

Since vesion 1.1.0.x, Java 6 (1.6) or higher is required.

## snappy-java-1.1.2-RC2 (18 May 2015)
* Fix #107: SnappyOutputStream.close() is not idempotent

## snappy-java-1.1.2-RC1 (13 May 2015)
* SnappyInputStream now supports reading concatenated compressed results of SnappyOutputStream
* There has been no compressed format change since 1.0.5.x. So You can read the compressed results interchangeablly between these versions.
* Fixes a problem when java.io.tmpdir does not exist.

## snappy-java-1.1.1.7 (14 Apr 2015)
* Fixes #100

## snappy-java-1.1.1.6 (26 Oct 2014)
* Fixes #88, #89, #90 and #91
* Fixed the broken build of 1.1.1.4 and memory leak bug 1.1.1.5 (so never use these versions)
Expand Down
18 changes: 13 additions & 5 deletions README.md
Expand Up @@ -39,15 +39,15 @@ Add the following dependency to your pom.xml:
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.1.1.6</version>
<version>1.1.2-RC3</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

### Using with sbt

```
libraryDependencies += "org.xerial.snappy" % "snappy-java" % "1.1.1.6"
libraryDependencies += "org.xerial.snappy" % "snappy-java" % "1.1.2-RC3"
```


Expand Down Expand Up @@ -75,7 +75,7 @@ In addition, high-level methods (`Snappy.compress(String)`, `Snappy.compress(flo
### Stream-based API
Stream-based compressor/decompressor `SnappyOutputStream`/`SnappyInputStream` are also available for reading/writing large data sets. `SnappyFramedOutputStream`/`SnappyFramedInputStream` can be used for the [framing format](https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt).

* See also [Javadoc API](https://oss.sonatype.org/service/local/repositories/releases/archive/org/xerial/snappy/snappy-java/1.1.1.6/snappy-java-1.1.1.6-javadoc.jar/!/index.html)
* See also [Javadoc API](https://oss.sonatype.org/service/local/repositories/releases/archive/org/xerial/snappy/snappy-java/1.1.2-RC3/snappy-java-1.1.2-RC3-javadoc.jar/!/index.html)

#### Compatibility Notes
* `SnappyOutputStream` and `SnappyInputStream` use `[magic header:16 bytes]([block size:int32][compressed data:byte array])*` format. You can read the result of `Snappy.compress` with `SnappyInputStream`, but you cannot read the compressed data generated by `SnappyOutputStream` with `Snappy.uncompress`. Here is the compatibility matrix of data foramt:
Expand All @@ -99,7 +99,7 @@ If you have snappy-java-(VERSION).jar in the current directory, use `-classpath`
## Public discussion group
Post bug reports or feature request to the Issue Tracker: <https://github.com/xerial/snappy-java/issues>

Public discussion forum is here: <http://groups.google.com/group/xerial?hl=en Xerial Public Discussion Group>
Public discussion forum is here: [Xerial Public Discussion Group)[http://groups.google.com/group/xerial?hl=en]


## Building from the source code
Expand Down Expand Up @@ -173,7 +173,15 @@ snappy-java uses sbt (simple build tool for Scala) as a build tool. Here is a si
> ~test-only * # run tests that matches a given name pattern
> publishM2 # publish jar to $HOME/.m2/repository
> package # create jar file

> findbugs # Produce findbugs report in target/findbugs
> jacoco:cover # Report the code coverage of tests to target/jacoco folder

If you need to see detailed debug messages, launch sbt with `-Dloglevel=debug` option:

```
$ ./sbt -Dloglevel=debug
```

For the details of sbt usage, see my blog post: [Building Java Projects with sbt](http://xerial.org/blog/2014/03/24/sbt/)

## Miscellaneous Notes
Expand Down
53 changes: 48 additions & 5 deletions build.sbt
@@ -1,6 +1,4 @@
import SonatypeKeys._

sonatypeSettings
import de.johoop.findbugs4sbt.ReportType

name := "snappy-java"

Expand All @@ -10,7 +8,7 @@ organizationName := "xerial.org"

description := "snappy-java: A fast compression/decompression library"

profileName := "org.xerial"
sonatypeProfileName := "org.xerial"

pomExtra := {
<url>https://github.comm/xerial/snappy-java</url>
Expand Down Expand Up @@ -47,10 +45,18 @@ pomExtra := {
</scm>
}

scalaVersion := "2.11.1"
scalaVersion := "2.11.6"

javacOptions in (Compile, compile) ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation", "-source", "1.6", "-target", "1.6")

javacOptions in doc := {
val opts = Seq("-source", "1.6")
if (scala.util.Properties.isJavaAtLeast("1.8"))
opts ++ Seq("-Xdoclint:none")
else
opts
}

testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v")

concurrentRestrictions in Global := Seq(Tags.limit(Tags.Test, 1))
Expand All @@ -63,6 +69,14 @@ logBuffered in Test := false

incOptions := incOptions.value.withNameHashing(true)

findbugsSettings

findbugsReportType := Some(ReportType.FancyHtml)

findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html")

jacoco.settings

libraryDependencies ++= Seq(
"junit" % "junit" % "4.8.2" % "test",
"org.codehaus.plexus" % "plexus-classworlds" % "2.4" % "test",
Expand All @@ -87,10 +101,14 @@ OsgiKeys.importPackage := Seq("""org.osgi.framework;version="[1.5,2)"""")
OsgiKeys.additionalHeaders := Map(
"Bundle-NativeCode" -> Seq(
"org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=x86-64",
"org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=x64",
"org/xerial/snappy/native/Windows/x86_64/snappyjava.dll;osname=win32;processor=amd64",
"org/xerial/snappy/native/Windows/x86/snappyjava.dll;osname=win32;processor=x86",
"org/xerial/snappy/native/Mac/x86/libsnappyjava.jnilib;osname=macosx;processor=x86",
"org/xerial/snappy/native/Mac/x86_64/libsnappyjava.jnilib;osname=macosx;processor=x86-64",
"org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=x86-64",
"org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=x64",
"org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so;osname=linux;processor=amd64",
"org/xerial/snappy/native/Linux/x86/libsnappyjava.so;osname=linux;processor=x86",
"org/xerial/snappy/native/Linux/aarch64/libsnappyjava.so;osname=linux;processor=aarch64",
"org/xerial/snappy/native/Linux/arm/libsnappyjava.so;osname=linux;processor=arm",
Expand All @@ -106,3 +124,28 @@ OsgiKeys.additionalHeaders := Map(
"Bundle-ActivationPolicy" -> "lazy",
"Bundle-Name" -> "snappy-java: A fast compression/decompression library"
)

import ReleaseTransformations._
import sbtrelease._

releaseTagName := { (version in ThisBuild).value }

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _)),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
pushChanges
)


com.etsy.sbt.Checkstyle.checkstyleSettings

com.etsy.sbt.Checkstyle.CheckstyleTasks.checkstyleConfig := file("src/checkstyle/checks.xml")
10 changes: 5 additions & 5 deletions lib/include/config.h
@@ -1,5 +1,5 @@

#ifndef __CONFIG_H
#define __CONFIG_H

#endif // __CONFIG_H

#ifndef __CONFIG_H
#define __CONFIG_H

#endif // __CONFIG_H
2 changes: 1 addition & 1 deletion project/build.properties
@@ -1,2 +1,2 @@
sbt.version=0.13.6
sbt.version=0.13.8

10 changes: 6 additions & 4 deletions project/plugins.sbt
@@ -1,12 +1,14 @@

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.7.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.2.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.5.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.3.0")
addSbtPlugin("de.johoop" % "findbugs4sbt" % "1.4.0")

addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.5")

addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.7.0")

addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "0.4.3")
10 changes: 5 additions & 5 deletions sbt
Expand Up @@ -4,8 +4,8 @@
# Author: Paul Phillips <paulp@typesafe.com>

# todo - make this dynamic
declare -r sbt_release_version="0.13.1"
declare -r sbt_unreleased_version="0.13.2-SNAPSHOT" # -sbt-dev doesn't work at present
declare -r sbt_release_version="0.13.8"
declare -r sbt_unreleased_version="0.13.8-SNAPSHOT" # -sbt-dev doesn't work at present
declare -r buildProps="project/build.properties"

declare sbt_jar sbt_dir sbt_create sbt_launch_dir
Expand Down Expand Up @@ -119,12 +119,12 @@ init_default_option_file () {

declare -r cms_opts="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC"
declare -r jit_opts="-XX:ReservedCodeCacheSize=256m -XX:+TieredCompilation"
declare -r default_jvm_opts="-Dfile.encoding=UTF8 -XX:MaxPermSize=384m -Xms512m -Xmx1536m -Xss2m $jit_opts $cms_opts"
declare -r default_jvm_opts="-ea -Dfile.encoding=UTF8 -Xms512m -Xmx1536m -Xss2m $jit_opts $cms_opts"
declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy"
declare -r latest_28="2.8.2"
declare -r latest_29="2.9.3"
declare -r latest_210="2.10.3"
declare -r latest_211="2.11.0-M5"
declare -r latest_210="2.10.5"
declare -r latest_211="2.11.6"

declare -r script_path="$(get_script_path "$BASH_SOURCE")"
declare -r script_name="${script_path##*/}"
Expand Down

0 comments on commit 3113ffb

Please sign in to comment.