Return to Image List

maven

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

See maven.apache.org for more information

This image is built by IBM to run on the IBM Z architecture and is not affiliated with any other community that provides a version of this image.


License

View license information here

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


Versions

Use the pull string below for the version of this image you require.
3.8.5-eclipse-temurin-17 docker pull icr.io/ibmz/maven@sha256:f0cb9e57fbd3579a250e1cdd3fb4203b2b76289dda0fb0cc1f8bef8faa29f19a Vulnerability Report05-19-2022
3.8.3-openjdk-17 docker pull icr.io/ibmz/maven@sha256:eed4c0381a81436f3c592248666cc6a0c298ad140aa5c37e1f2cf10e56b46e37 Vulnerability Report10-20-2021
3.8.6-eclipse-temurin-17 docker pull icr.io/ibmz/maven@sha256:3c0a200747e189c3a68bdd89100a5d855b7615aaf0522864de525070b25de2a1 Vulnerability Report06-17-2022
3.9.0-eclipse-temurin-17 docker pull icr.io/ibmz/maven@sha256:207d87f9e6c722613f160a3bbeb8ac9a71554ef5bda938e1b3c4c4ac187d22a7 Vulnerability Report03-10-2023
Version Pull String Security (IBM Cloud) Created

Usage Notes

Create a Dockerfile to build an image the builds your Maven project:

FROM icr.io/ibmz/maven:[version]
COPY . /usr/src
WORKDIR /usr/src/{Your maven project folder}
CMD [ "mvn", "valid", "maven" "options" ]

Build the image:
docker build . --tag {custom maven image}

Run a container using the image that you just built to perform the Maven operation specified in the image on your Maven project.
docker run --name {maven container} {custom maven image}

Multi-stage Builds:

You can build your application with Maven and package it in an image that does not include Maven using multi-stage builds.

FROM icr.io/ibmz/maven:[version]
WORKDIR /usr/src/app
COPY pom.xml .
RUN mvn -B -e -C -T 1C org.apache.maven.plugins:maven-dependency-plugin:3.1.1:go-offline
COPY . .
RUN mvn -B -e -o -T 1C verify
FROM icr.io/ibmz/openjdk:11.0.8
COPY --from=0 /usr/src/app/target/*.jar ./