Forge Home

maven

Puppet module to manage Apache Maven

17,125 downloads

8,692 latest version

3.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Feb 22nd 2018

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'unibet-maven', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add unibet-maven
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install unibet-maven --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

unibet/maven — version 0.1.1 Feb 22nd 2018

maven

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with maven
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.

Overview

Simple Puppet module for managing Apache Maven. Tested on osfamily Redhat

Module Description

Installs Maven from system package or tar.gz, manages a users settings.xml

Setup

What maven affects

  • By default, maven installation in /opt/apache-maven-VERSION
  • $HOME/.m2/settings.xml for user

Setup Requirements

Maven is java based and thus requires java to be installed to function. When installing from tar.gz the module also requires wget, tar and gzip To minimize the dependencies these are expected to be installed outside of the maven scope

Beginning with maven

puppet module install unibet-maven

Usage

Install maven from upstream:

class { '::maven':
  package_ensure  => '3.1.1'
}

Install maven from upstream using a specific download mirror:

class { '::maven':
  package_ensure  => '3.1.1',
  wget_url        => 'http://apache.rediris.es/maven/maven-3'
}

Install maven from some custom package:

class { '::maven':
  install_from_package  => true,
  package               => 'my-maven-package',
  package_ensure        => present
}

Manage settings.xml for user1:


::maven::settings { 'user1':
  path    => '/home',
  mirrors => [
    {
      id        => 'proxy',
      name      => 'My proxy',
      url       => 'http://nexus.example.com/path',
      mirror_of => '*'
    }
  ],
  profiles  => [
    {
      id                => 'default',
      active_by_default => true
      properties        => [
        {
          key   => 'property1',
          value => 'value1'
        }
      ],
      repositories  => [
        {
          id        => 'my-repo', 
          url       => 'http://nexus.example.com/my-repo',
          layout    => 'default',
          releases  => true,
          snapshots => false
        }
      ],
      plugin_repositories => [
        {
          id        => 'my-plugin-repo',
          url       => 'http://nexus.example.com/my-plugin-repo',
          layout    => 'default',
          releases  => true,
          snapshots => false
        }
      ],
    },
  ],
  servers => [
    {
      id  => 'my-repo',
      username  => 'LOGIN',
      password  => 'PW'
    }
  ],
}

Reference

  • Classes: maven
  • Defines: maven::settings

See class / define docs and usage

Limitations

Only tested on OS family Redhat

Development

Pull requests are welcome.