Table of Contents generated with DocToc
Run tests as usual from the command-line with maven:
mvn integration-test
When integration testing it may be useful to install in your local maven repository without running tests or signing the artifacts. You can do this with:
mvn install -DskipTests -Dgpg.skip
Run tests within your IDE as appropriate for the tool. Note you will need to export the following two environment variables in your run configuration for tests to pass.
AWS_ACCESS_KEY_ID=test_aws_access_key_id
AWS_SECRET_ACCESS_KEY=test_aws_secret_access_key
For example, in IntelliJ you can edit the run configuration and set environment variables.
This library is published to Maven Central so other can easily depend on it.
To release, there are a number of prerequisites:
- You need permissions to publish artifacts - see OSSRH-24019.
- You need GPG setup to sign artifacts. GPGTools might be useful for managing your keys.
First, prepare the release. This will build and sign the deploy artifacts.
mvn release:clean release:prepare
If preparing the release looks good you can release to the Sonatype OSS repo, which is mirrored by Maven Central.
mvn release:perform
If the release was successful, push the local changes that maven made during the release to GitHub.
git push
git push --tags
To ensure a consistent development environment, we develop in a Docker container.
Build the development container image with the following command. In most cases you only need to do this once, when doing your first build.
docker build -t spark-dynamodb-dev .
Run the container with the following command. Notice this establishes a bash session, and bind mounts both the project working directory and maven cache into the container.
docker run -it -v ~/.m2:/root/.m2 -v "${PWD}":/src -w /src spark-dynamodb-dev bash
From a workflow perspective, you can make changes outside the container using your favorite tools (e.g.: IntelliJ), and build inside the container.