NAV

Continuous Integration and Continuous Deployment with Java

CircleCI supports building Java applications using most common JDKs and build tools. Before each build, we look at your repository and infer commands to run, so most setups should work automatically. If your project has special requirements, you can augment or override inferred commands with a circle.yml file.

Version

We have several versions of JDK pre-installed on Ubuntu 12.04 and Ubuntu 14.04 build images.

If you’d like a particular version, you can specify it in your circle.yml.

machine:
  java:
    version: openjdk7

Available tools may differ between build image versions, see Differences Between Trusty and Precise for more information.

Dependencies & Tests

CircleCI supports Apache Ant, Play Framework, Gradle, and Apache Maven out of the box. Note: Play Framework is not installed on Ubuntu 14.04 instances, only on 12.04 instances. Depending on your build tooling, we will infer different commands:

Tool Dependency Resolution Testing
Maven `mvn dependency:resolve` `mvn integration-test`
Ant `ant`
Gradle `gradle dependencies` `gradle test`
Play `play dependencies` `play test`

You can easily customize inferred build commands in your circle.yml by setting the override, pre, post in the dependencies and test sections.