Skip to content

sous-chefs/maven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

393 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

maven Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

Custom resources for installing Apache Maven, downloading Maven artifacts, and editing settings.xml.

Use the custom resources directly:

  • maven_install
  • maven_artifact
  • maven_settings

This cookbook does not install Java. Ensure a compatible JDK is present before using the mvn binary or maven_artifact.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you'd like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

The cookbook metadata currently supports:

  • AlmaLinux 9+
  • Amazon Linux 2023+
  • Debian 12+
  • Debian 13+
  • Fedora
  • Rocky Linux 9+
  • Ubuntu 22.04+

Chef

  • Chef Infra Client 16+

Cookbooks

  • ark 5.0+

Resource Overview

maven_install

Installs Apache Maven from the upstream binary tarball, manages the Maven home, and writes a mavenrc file with M2_HOME and MAVEN_OPTS.

maven_install 'default' do
  version '3.9.14'
end

maven_artifact

Downloads an artifact from one or more remote repositories by invoking the Maven dependency plugin through mvn.

maven_artifact 'mysql-connector-j' do
  group_id 'com.mysql'
  version '8.4.0'
  dest '/opt/app/lib'
end

maven_settings

Updates a value in an existing settings.xml file by dotted path.

maven_settings 'settings.localRepository' do
  value '/srv/maven-repository'
end

Usage

Install a supported JDK first, then declare the resources you need in your own wrapper cookbook. A typical flow is:

  1. Install Java with your preferred cookbook or base image.
  2. Use maven_install to place Maven on the node.
  3. Use maven_settings to adjust settings.xml if needed.
  4. Use maven_artifact to fetch application dependencies or deployment assets.

See test/cookbooks/test/recipes/default.rb for the full default-suite example that exercises all three resources together.

Resource Documentation

Limitations

See LIMITATIONS.md for supported platforms, architecture notes, and current behavioral constraints of the resources.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Sponsor this project

Packages

 
 
 

Contributors