Makes use the use of MessagePack from sbt easier
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Due to the fact that the current msgpack-idl executable doesn't generate valid java code this plugin is pretty useless.

I probably should have checked that out before I wrote it. Ha.

MessagePack plugin for sbt 0.11+

Instructions for use:

Step 1: Include the plugin in your build

Add the following to your project/plugins/build.sbt:


resolvers += "bigtoast-github" at ""

addSbtPlugin("com.github.bigtoast" % "sbt-msgpack" % "0.1")

Step 2: Add sbt-msgpack settings to your build

Add the following to your 'build.sbt' ( if you are using build.sbt )

import com.github.bigtoast.sbtmsgpack.MsgPackPlugin

seq(MsgPackPlugin.msgPackSettings: _*)

Or if you are using a build object extending from Build:

import sbt._
import Keys._
import com.github.bigtoast.sbtmsgpack.MsgPackPlugin

class BuildWithMsgPackShiz extends Build {
     lazy val seniorProject = Project("hola", file("."), settings = 
      Defaults.defaultSettings ++ MsgPackPlugin.msgPackSettings ++ Seq(/* custom settings go here */))


msgpack-idl MessagePack idl generator executable. This defaults to just 'msgpack-idl'
        msgpackIdl := "/some/other/path/to/msgpack-idl"

            <td> <b>msgpackSourceDir</b> </td>
            <td>Directory containing thrift sources. This defaults to 'src/main/msgpack'.</td>

        msgpackSourceDir &lt;&lt;= baseDirectory( _ / "other" / "msgpack" / "sourceDir" )

            <td> <b>msgpackOutputDir</b> </td>
            <td>The output dir for the generated sources. This directory will be added to sourceManaged so it will be automatically get compiled when you run compile. This defaults to 'target/generated-sources'.</td>
            <td> <b>msgpackJavaOptions</b> </td>
            <td>Additional options to msgpack compiler for java generation.</td>
            <td> <b>msgpackJavaEnabled</b> </td>
            <td> Are we generating java source (?)  Default is true.</td>
            <td> <b>msgpackVersion</b> </td>
            <td> Version of the MessagePack lib. Default is 0.6.5.</td>


msgpack:generate-java This will run generate java sources from the msgpack sources. This task is automatically executed when compile is run.

Warnings and Notes

Currently the msgpack-idl doesn't generate current java code so this plugin isn't of much use. I didn't find this out until after writing the plugin of course.

If any bugs are found or features wanted please file an issue in the github project. I will do my best to accommodate.


Andrew Headrick bigtoast