JaCoCo is a production-grade Java code coverage library that instruments JVM bytecode at runtime or offline to collect execution data, then analyzes and reports coverage metrics (lines, branches, instructions, methods, cyclomatic complexity). It is not a standalone application but a multi-module toolset: a Java agent (`jacocoagent.jar`) for on-the-fly instrumentation, a CLI (`jacococli.jar`) for offline operations, a Maven plugin (`jacoco-maven-plugin`) with goals like `prepare-agent`, `report`, `check`, and Ant tasks. The core library (`org.jacoco.core`) handles bytecode manipulation via ASM, probe insertion, and coverage analysis; the report module (`org.jacoco.report`) generates HTML, CSV, XML, and rule-based check outputs. The architecture follows a layered design: instrumentation → runtime data collection → analysis → reporting, with a visitor pattern for report generation and a filter framework to ignore compiler-generated bytecode (e.g., synthetic methods, Kotlin coroutines, try-with-resources). External dependencies include ASM for bytecode engineering, args4j for CLI parsing, and Google Code Prettify for HTML syntax highlighting. The project supports Java versions 5 through 28 (including preview features) and JVM languages like Kotlin, Groovy, and Scala through extensive compiler-specific filters.
Jenkins is the leading open-source automation server, providing a web-based platform for continuous integration and continuous delivery (CI/CD). In production, it orchestrates build, test, and deployment pipelines triggered by SCM changes, scheduled intervals, or manual requests. The architecture is a monolithic Java web application with a plugin-based extension system, using Stapler for URL routing, Jelly/HTML views, and a modern JavaScript frontend bundled with webpack. Key entry points include the central `Jenkins` singleton, a rich set of CLI commands (e.g., `BuildCommand`, `CreateJobCommand`), and a REST-like API. Data flows involve job scheduling via the `Queue`, execution on agents (controller/agent architecture), SCM checkout, build steps, artifact archiving, and result reporting. External dependencies include a servlet container (Jetty), Spring Security (migrating from Acegi), XStream for XML persistence, and numerous libraries for remoting, templating, and UI components. The codebase is highly extensible through `@Extension` points, descriptors, and a well-defined plugin lifecycle.
Ratpack is a lightweight, reactive web framework for the JVM built on Netty and Java 8. It provides an asynchronous execution model based on Promise/Operation, a flexible handler chain for request processing, pluggable configuration from multiple sources, and a Registry-based dependency injection system. The framework includes first-class Groovy DSL support, a comprehensive test harness, and integrations with Spring Boot, Google Guice, Dropwizard Metrics, multiple template engines (Handlebars, Thymeleaf, Rocker, Groovy), Redis for session storage, and reactive libraries (RxJava 2, Reactor). The codebase is modular with over 30 subprojects, extensive Spock test coverage, and a Gradle plugin for continuous reloading. While the public API is well-designed and documented, the internal packages are tightly coupled to Netty internals and some integration modules may lag behind external library versions.
The Jenkins Job DSL Plugin is a mature, actively maintained Jenkins plugin that provides a Groovy-based domain-specific language for programmatically defining Jenkins jobs, views, folders, and other configuration items. It enables 'Configuration as Code' for Jenkins, allowing infrastructure to be version-controlled and automatically generated. The plugin executes as a build step in a seed job, parsing DSL scripts and creating or updating Jenkins items. The architecture consists of a core library (`job-dsl-core`) with hundreds of context classes that map DSL method calls to XML configuration nodes, and a Jenkins plugin module (`job-dsl-plugin`) that integrates with the Jenkins API for script execution, security, and result tracking. The plugin supports all major Jenkins job types (freestyle, pipeline, multibranch, matrix, etc.), SCM integrations, build triggers, wrappers, publishers, and parameterized builds. A notable feature is the Dynamic DSL, which automatically discovers and exposes methods for any Jenkins plugin that follows the Describable pattern, reducing the need for built-in methods. The codebase is extensive with thorough Spock tests, but is tightly coupled to specific Jenkins plugin versions and Groovy 2.4, and the built-in DSL is in maintenance mode in favor of the Dynamic DSL. The repository includes a web-based API viewer and comprehensive documentation for migration and scripting.