Dockerfile Maven Plugin

Adds support for building Dockerfiles in Maven

License

License

Categories

Categories

Maven Build Tools Docker Container Virtualization Tools
GroupId

GroupId

ca.vanzyl
ArtifactId

ArtifactId

dockerfile-maven-plugin
Last Version

Last Version

1.4.19
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Dockerfile Maven Plugin
Adds support for building Dockerfiles in Maven

Download dockerfile-maven-plugin

How to add to project

<plugin>
    <groupId>ca.vanzyl</groupId>
    <artifactId>dockerfile-maven-plugin</artifactId>
    <version>1.4.19</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
ca.vanzyl : docker-client jar 8.16.1
com.google.auth : google-auth-library-oauth2-http jar 0.6.0
com.google.guava : guava jar 23.6.1-jre
ca.vanzyl : dockerfile-maven-extension jar 1.4.19
org.apache.maven : maven-plugin-api jar 3.5.4
org.apache.maven : maven-core jar 3.5.4
org.apache.maven : maven-archiver jar 3.2.0
org.sonatype.plexus : plexus-sec-dispatcher jar 1.4
com.google.code.gson : gson jar 2.8.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.2

test (2)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.15.0
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

foss-root

A root pom for configuring common release related plugins for open source maven projects.

Usage

There's still some boilerplate that has to go into your project pom.xml. Use the template below.

<project>
  <parent>
    <groupId>com.spotify</groupId>
    <artifactId>foss-root</artifactId>
    <version>LATEST-VERSION</version>
  </parent>
  
  <artifactId>YOUR_ARTIFACT_NAME</artifactId>
  <version>VERSION-SNAPSHOT</version>
  
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <developers>
    <developer>
      ...
    </developer>
  </developers>
  
  <scm>
    <url>https://github.com/spotify/YOUR_REPO</url>
    <connection>scm:git:[email protected]:spotify/YOUR_REPO.git</connection>
    <developerConnection>scm:git:[email protected]:spotify/YOUR_REPO.git</developerConnection>
    <tag>HEAD</tag>
  </scm>
  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
 </project>

By default your project will target Java 8. If you don't need Java 8 compatibility and you would like to target a later version of Java, set the maven.compiler.release property in your project, like so:

<properties>
  <maven.compiler.release>11</maven.compiler.release>
</properties>

After setting this up, you'll be able to

add license headers to all sources

mvn license:update-file-header

deploy snapshots

mvn deploy

deploy releases

mvn release:prepare
mvn release:perform
ca.vanzyl

Spotify

Versions

Version
1.4.19
1.4.18
1.4.17
1.4.16
1.4.15
1.4.14