Gretty is a Gradle plugin for running web applications on embedded servlet containers such as Jetty or Tomcat. It allows developers to quickly test and debug Java web applications without needing a standalone application server installation. With Gretty, you can launch a webapp in development mode, support hot reloading, and debug servlet/JSP code directly from an IDE or Gradle task. The plugin supports multiple servlet container versions, context paths, and integration with WAR and exploded webapp projects. Developers can define configurations for different environments, such as testing, staging, and production, while keeping everything manageable from Gradle. By embedding the server in the build, Gretty streamlines the development feedback loop for web applications.
Features
- Embeds Jetty (versions 7–9) and Tomcat (versions 7–8) containers for local runs
- Multiple web applications support in a single build
- Provides Gradle tasks for launching and managing web servers
- Configurable via a Gradle DSL for runtime options, context, port
- Enables fast dev cycles without external containers
- Supports integration tests and smooth plugin integration