dockpack.base_maven
Maven - Maven is a tool that helps build Java projects in a way that works on different platforms. It takes care of project dependencies and the entire project life cycle. This is an Ansible role for installing Maven.
Requirements
This role is designed for Ubuntu Trusty or RedHat systems like RHEL/Centos 7. It requires the dockpack.base_java8 role.
Role Variables
You can specify the Maven version to use, currently set to 3.6.3.
There are 3 variables that should be saved in a vault file:
- mvn_master_password
- mvn_repo_username
- mvn_repo_password
Dependencies
Maven requires Java8. This role will automatically install dockpack.base_java8 if it’s not already on your system.
Using Maven Manually
mvn -X deploy:deploy-file -DgroupId=$GROUPID -DartifactId=$FILENAME -Dversion=$VERSION -DgeneratePom=true -Dpackaging=jar -DrepositoryId="0ss-releases" -Durl="https://repo.example.com/path/releases" -Dfile=redis.jar
Example Playbook
For a full example using this role, you can view my build server: git clone https://github.com/bbaassssiiee/buildserver.git
Here’s how to use this role in a playbook:
- hosts: servers
roles:
- { role: dockpack.base_java8 }
- { role: dockpack.base_maven }
License
MIT
Author Information
Bas Meijer @bbaassssiiee
Maven build system - mvn.
ansible-galaxy install dockpack.base_maven