- 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.
Simple Puppet module for managing Apache Maven. Tested on osfamily Redhat
Installs Maven from system package or tar.gz, manages a users settings.xml
- By default, maven installation in /opt/apache-maven-VERSION
- $HOME/.m2/settings.xml for user
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
puppet module install unibet-maven
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'
}
],
}
- Classes: maven
- Defines: maven::settings
See class / define docs and usage
Only tested on OS family Redhat
Pull requests are welcome.