Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/msgpack/msgpack-scala

MessagePack serializer implementation for Scala / msgpack.org[Scala]
https://github.com/msgpack/msgpack-scala

msgpack scala serialization

Last synced: 3 months ago
JSON representation

MessagePack serializer implementation for Scala / msgpack.org[Scala]

Awesome Lists containing this project

README

        

# MessagePack for Scala
[![Build Status](https://travis-ci.org/msgpack/msgpack-scala.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-scala)

- Message Pack specification: https://github.com/msgpack/msgpack/blob/master/spec.md

## Quick Start

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.msgpack/msgpack-scala_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.msgpack/msgpack-scala_2.12/)

```
libraryDependencies += "org.msgpack" %% "msgpack-scala" % "(version)"
```

General usage is the same with msgpack-java. See this [example code (Java)](https://github.com/msgpack/msgpack-java/blob/develop/msgpack-core/src/test/java/org/msgpack/core/example/MessagePackExample.java).

## For MessagePack Developers

### Basic sbt commands
Enter the sbt console:
```
$ ./sbt
```

Here is a list of sbt commands for daily development:
```
> ~compile # Compile source codes
> ~test:compile # Compile both source and test codes
> ~test # Run tests upon source code change
> ~test-only *MessagePackTest # Run tests in the specified class
> ~test-only *MessagePackTest -- -n prim # Run the test tagged as "prim"
> project msgpack-scala # Focus on a specific project
> package # Create a jar file in the target folder of each project
> scalafmt # Reformat source codes
> ; coverage; test; coverageReport; coverageAggregate; # Code coverage
```

### Publishing

```
> publishLocal # Install to local .ivy2 repository
> publish # Publishing a snapshot version to the Sonatype repository

> release # Run the release procedure (set a new version, run tests, upload artifacts, then deploy to Sonatype)
```

For publishing to Maven central, msgpack-scala uses [sbt-sonatype](https://github.com/xerial/sbt-sonatype) plugin. Set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.

___$HOME/.sbt/(sbt-version)/sonatype.sbt___

```
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
"(Sonatype user name)",
"(Sonatype password)")
```