Version information
released Feb 22nd 2018
Start using this module
Add this module to your Puppetfile:
mod 'unibet-maven', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
unibet/maven — version 0.1.1 Feb 22nd 2018
maven
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with maven
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- 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.
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
Copyright 2014 North Development AB Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.