Thanks for helping improve contentful-management.java.
This repository includes a .devcontainer configuration for a reproducible local setup. GitHub Actions uses the same devcontainer configuration for CI.
Open the repository in Visual Studio Code, install the Dev Containers extension if needed, then run Dev Containers: Reopen in Container. Wait for the container build and post-create setup to finish.
Install Docker and the Dev Container CLI (npm install -g @devcontainers/cli). From the repository root, run:
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bash./mvnw -B test- Fork the repository and create a branch for your change.
- Run the relevant checks from the dev container.
- Open a pull request with a short summary of the change and any follow-up context.
- Framework: JUnit 4 (runner), Kotlin test assertions (
kotlin-test-junit), OkHttpMockWebServer - Unit tests:
src/test/kotlin/com/contentful/java/cma/— each resource module has a corresponding*Tests.ktfile - E2E / integration tests:
src/test/kotlin/com/contentful/java/cma/e2e/— require live CMA credentials (CONTENTFUL_ACCESS_TOKEN,CONTENTFUL_SPACE_ID) - Run all tests:
./mvnw -B test - Run specific test class:
./mvnw -B -Dtest=EntryTests test - Test fixtures: JSON response mocks are in
src/test/resources/
Checkstyle is enforced on every verify run:
./mvnw -B verifyThe configuration lives in checkstyle.xml at the repo root. Violations will fail the build. Run ./mvnw -B verify locally before pushing to catch checkstyle violations — CI only runs ./mvnw -B test, which skips the checkstyle phase.
This repo follows Conventional Commits by convention:
type(scope): description
Valid types: feat, fix, chore, docs, refactor, test, perf, ci, build
Examples:
feat(entries): add PATCH support for partial updates
fix(rich-text): correct nodeType deserialization for embedded entries
chore: update OkHttp to 4.12.0
master— the main branch; all PRs target here- Feature/fix branches — use descriptive names, e.g.,
feat/add-taxonomy-module,fix/rate-limit-retry - Release branches —
release/X.Y.Zused during the release process
Releases are managed via maven-release-plugin:
# Prepare a release (updates pom.xml versions, creates release tag)
./mvnw release:prepare
# Perform the release (builds, signs, and publishes to Sonatype Central)
./mvnw release:performArtifacts are published to Maven Central under com.contentful.java:cma-sdk. Pre-release snapshots are available via Sonatype snapshots repository and jitpack.io.
| Job | Trigger | What it does |
|---|---|---|
CI / Test (Java 8) |
Push to master, PR to master |
Spins up devcontainer, runs ./mvnw -B test |
CodeQL |
Push / PR / weekly schedule | Static analysis for security vulnerabilities |