Skip to main content

Maven

This guide covers configuring continuous integration pipelines for Maven projects.

Build and Test

In the below example we demonstrate a pipeline that executes mvn install and mvn test commands. These commands are executed inside a Docker container, downloaded at runtime from DockerHub.

kind: pipeline
spec:
stages:
- type: ci
spec:
steps:
- name: test
type: run
spec:
container: maven:3-jdk-10
script: |-
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
mvn test -B

Please note that you can use any Docker image in your pipeline from any Docker registry. You can use the official maven images, or your can bring your own.

AIDA logo
AIDA logo

Harness AIDA Chatbot

AI Development Assistant


Today, March 15, 12:47am

AIDA logo

Accelerate your software delivery with the powerful capabilities of Harness’s Platform.

AIDA logo

How can I help?

Log into your Harness Account to access AIDA