Public Repository

Last pushed: 3 months ago
Short Description
A Concourse.ci resource for caching Maven dependencies.
Full Description

Maven Cache Resource

A Concourse.ci resource for caching Maven dependencies.

The approach and code is based on gradle-cache-resource.

Source Configuration

The resource uses the git-resource internally, so any of
the git-resource parameters can be used. It is advisable to use the paths parameter to only listen
to changes of the pom.xml of the Maven project.

Additionally, the following Maven specific configuration is supported.

  • settings.url: Optional. A URL, which points to a custom Maven settings.xml file.
  • master-password: Optional. An encrypted Maven master password, which is written to the settings-security.xml file by the resource.

Behavior

check: Check for git repo changes

Simply forwards the control to the check script of the git-resource to check for any changes in
the source repository.

It is advisable to track changes to the pom.xml only, since that describes the project dependencies.

in: Cache dependencies

The source repository is first cloned using the git-resource and then dependencies are cached
with mvn dependency:go-offline.

If settings.url is specified in the source configuration, the downloaded settings.xml
file is going to be available in the resource's root folder, so it can be referenced
in tasks, which use the resource as an input (see example-pipeline.yml).

out: Not used

Usage

An example usage is documented in example-pipeline.yml.

Docker Pull Command
Owner
olhtbr

Comments (2)
olhtbr
2 months ago

I think this was fixed Concourse 3.3.1
According to https://concourse.ci/downloads.html#v3.3.1 :
"The last release (v3.3.0) broke resource configs with nested maps in them. This is now fixed."

However, this image might be obsolete, as Concourse 3.3.0 introduced the 'caches' keyword in the task configs. :)

gm2552
3 months ago

This appears to no longer work in Concourse 3.3.0. I'm getting reports of the following error across all of our pipelines:

json: unsupported type: map[interface {}]interface {}