This guide walks you through the build environment and configuration topics specific to Java projects. Please make sure to read our Getting Started and general build configuration guides first.
First of all, you need to specify in your build configuration that you project main language will be Java
language: java
Bazooka built-in Java support comes with the following jvm implementations
- openjdk6
- openjdk7
- openjdk8
- oraclejdk6
- oraclejdk7
- oraclejdk8
You can choose multiple versions on which your project will be tested
language: java
jdk:
- openjdk8
- oraclejdk7
- oraclejdk8
This will generate permutations on which your project will be tested
Bazooka will try to find which build tool you are using in your project and define reasonable defaults for your build phases. Of course, these values can be overridden if you don't want to use them
To determine which build tool your project is using :
- If a file named
build.gradle
exists in your project:- If a file named
gradlew
exists in your project, the build tool is gradlew - Otherwise, the build tool to gradle
- If a file named
- If a file name pom.xml exists in your project, the build tool is maven
- Otherwise, the build tool is ant by default
the defaults generated for a maven project are equivalent to the following configuration
install: mvn install -DskipTests=true
script: mvn test
the defaults generated for a gradlew project are equivalent to the following configuration
install: ./gradlew assemble
script: ./gradlew check
the defaults generated for a gradle project are equivalent to the following configuration
install: gradle assemble
script: gradle check