Thank you for considering contributing to the OJS Java SDK! This document provides guidelines and information to help you get started.
- Java 21 or later
- Maven 3.9+ or Gradle 8+
# Maven
mvn clean verify
# Gradle
gradle build# Unit tests only
mvn test
# Unit + integration tests (requires running OJS server)
mvn verify -Dit.test=RedisBackendITStart a Redis-backed OJS server with Docker Compose:
docker compose up -d
# Server available at http://localhost:8080
# Stop with: docker compose down- Use the GitHub Issues page
- Check existing issues before creating a new one
- Include steps to reproduce, expected behavior, and actual behavior
- Include your Java version and OS
- Open a GitHub Issue with the "enhancement" label
- Describe the use case and expected behavior
- If possible, reference the relevant OJS specification
- Fork the repository
- Create a feature branch from
main(git checkout -b feature/my-feature) - Make your changes
- Ensure all tests pass (
mvn clean verify) - Commit with a descriptive message following Conventional Commits
- Push to your fork and open a Pull Request
We follow Conventional Commits:
feat(client): add batch cancellation support
fix(worker): prevent semaphore leak on transport errors
test: add edge case tests for JSON parser
docs: update README with workflow examples
chore(build): bump JUnit to 5.11
- Follow existing code conventions in the project
- Use Java 21 features where appropriate (records, sealed interfaces, pattern matching)
- Keep the zero-runtime-dependency promise — new dependencies must be
optionalortest-scoped - Add Javadoc to all public classes, methods, and interfaces
- Use
@FunctionalInterfacefor single-method interfaces
- Write unit tests for all new functionality
- Use Mockito for transport-layer mocking
- Use
@Nestedclasses to organize related tests - Use
@DisplayNamefor descriptive test names - Aim for meaningful coverage, not just high percentages
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.