plugin
An add-on that extends a tool with extra features, such as the Maven and Gradle plugins that compile, test and package Java code.
In more detail
In Maven, each plugin binds goals to lifecycle phases; for example the Surefire plugin runs tests in the test phase. In Gradle, applying a plugin such as java-library adds tasks for compiling, testing and packaging. When a build fails, look for which plugin or task failed.
Example
plugins { `java-library` }Related terms
- Maven build lifecycle — Maven's fixed, ordered list of phases, validate, compile, test, package, verify, install and deploy, where asking for one runs all before it.
- Gradle task — A unit of work in a Gradle build, such as compileJava or test, which declares its inputs and outputs and its dependencies on other tasks.
- Maven Surefire Plugin — The Maven plugin that runs unit tests during the test phase and writes their reports to target/surefire-reports.
Taught in
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- The Toolchain: Gradle — Modern Java: Virtual Threads & High-Throughput Services