-
Notifications
You must be signed in to change notification settings - Fork 33
Contributing
- SBT 0.13.2 or higher
- Java JDK 1.7 latest release
- A pleasant disposition and a hankering for writing code
- Git
- Akka - for saneness in parallelism
- SBT Scoverage Plugin - we use scoverage for doing our code coverage. Scoverage is optimized to handle the differences of a Scala project.
- ScalaTest - yea, this thing is awesome. I learn something new almost every day
- SBT AspectJ Plugin
Money uses SBT for doing its builds. SBT was chosen for a few reasons:
- It is the defacto build tool for Scala
- It provides a REPL, so you can experiment with your code in the REPL (awesomeness)
- It has the ability to detect code changes and re-run tasks automatically using the subtle but effective
~
- IntelliJ has progressed in support to the point that SBT is now entirely usable
First, change your directory to the project root. From there, simply startup the sbt project by typing sbt
at the
command line. You will be taken into the wonderful land of SBT. You know you have arrived when you see something like
[info] Loading project definition from /Users/dude/dev/workspaces/cim/money/project
[info] Set current project to money (in build file:/Users/dude/dev/workspaces/cim/money/)
>
By default, you will be in the project root (or "parent" project for you maven geeks)
The following are useful commands for working with Money:
- clean - cleans all of the modules in the project
- compile - compiles the source code for all of the modules in the project
- test - runs all of the unit tests for all of the modules in the project.
- package - creates the distribution jars, including source and documentation jars, for all of the modules in the project
- publishM2 - publishes all of the artifacts to the maven repository
- publish - publishes all of the artifacts to all of the repositories, including maven and ivy
- publish-local - publishes all of the artifacts to the local repositories, specifically ivy
- scoverage:test - runs all of the unit tests for all of the modules in the project, and generates code coverage.
SBT also gets fancy by allowing you to combine tasks like so:
>;clean;compile;scoverage:test;+publishM2
Sure you can, simply specify the module name in the SBT console and change projects, like to change the project to money-core:
>project money-core
The other modules are:
money-aspectj
money-akka
money-concurrent
money-http-client
money-java-servlet
money-kafka
When you change projects, then any of the sbt targets you run are only applied to that module, instead of all of them.
> compile
> scoverage:test
This will compile the code (if necessary) and then run code coverage analysis. The report will be generated in
target/scoverage-report/index.html
> test
> test-only *HttpTraceAspectSpec
> ~test-only *HttpTraceAspectSpec
> it:test
> +publishM2
Note: this will attempt to publish to a remote maven repo if the version is not a snapshot.
- Overview
- Configuration
- Logging Setup
- Performance Considerations
- Java Users Guide
- Scala Users Guide
- Modules
- Contributing