Building JVM projects

Table of Contents

Java Quickstart
The Java plugin
A basic Java project
Multi-project Java build
Where to next?
Building Java & JVM projects
Introduction
Declaring your source files via source sets
Managing your dependencies
Compiling your code
Managing resources
Running tests
Packaging and publishing
Generating API documentation
Cleaning the build
Building Java libraries
Building Java applications
Building Java web applications
Building Java enterprise applications
Testing in Java & JVM projects
Test execution
Debugging when running tests
Test filtering
Test reporting
Test detection
Test grouping
Using JUnit 5
Test execution order in TestNG
Configuring integration tests
The Base Plugin
Usage
Tasks
Dependency management
Conventions
The Java Plugin
Usage
Project layout
Source sets
Tasks
Dependency management
Convention properties
Javadoc
Clean
Resources
CompileJava
Test
Jar
The Java Library Plugin
Usage
API and implementation separation
Recognizing API and implementation dependencies
The Java Library plugin configurations
Known issues
Web Application Quickstart
Building a WAR file
Running your web application
Summary
The War Plugin
Usage
Tasks
Project layout
Dependency management
Convention properties
War
Customizing
The Ear Plugin
Usage
Tasks
Project layout
Dependency management
Convention properties
Ear
Customizing
Using custom descriptor file
The Jetty Plugin
The Application Plugin
Usage
Tasks
Convention properties
The Java Library Distribution Plugin
Usage
Tasks
Including other resources in the distribution
Groovy Quickstart
A basic Groovy project
Summary
The Groovy Plugin
Usage
Tasks
Project layout
Dependency management
Automatic configuration of groovyClasspath
Convention properties
Source set properties
GroovyCompile
Compiling and testing for Java 6 or Java 7
The Scala Plugin
Usage
Tasks
Project layout
Dependency management
Automatic configuration of scalaClasspath
Configuring the Zinc compiler
Convention properties
Source set properties
Compiling in external process
Incremental compilation
Compiling and testing for Java 6 or Java 7
Eclipse Integration
IntelliJ IDEA Integration
The ANTLR Plugin
Usage
Tasks
Project layout
Dependency management
Convention properties
Source set properties
Controlling the ANTLR generator process
The Checkstyle Plugin
Usage
Tasks
Project layout
Dependency management
Configuration
Customizing the HTML report
The CodeNarc Plugin
Usage
Tasks
Project layout
Dependency management
Configuration
The FindBugs Plugin
Usage
Tasks
Dependency management
Configuration
Customizing the HTML report
The JDepend Plugin
Usage
Tasks
Dependency management
Configuration
The PMD Plugin
Usage
Tasks
Dependency management
Configuration
The JaCoCo Plugin
Getting Started
Configuring the JaCoCo Plugin
JaCoCo Report configuration
Enforcing code coverage metrics
JaCoCo specific task configuration
Tasks
Dependency management
The OSGi Plugin
Usage
Implicitly applied plugins
Tasks
Convention object
The Eclipse Plugins
Usage
Tasks
Configuration
Customizing the generated files
The IDEA Plugin
Usage
Tasks
Configuration
Customizing the generated files
Further things to consider