Skip to content

Commit

Permalink
Apache Maven version 3.9.1 (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Eugen Cristea <eugen.cristea@prolion.com>
  • Loading branch information
tecris and Eugen Cristea authored Mar 26, 2023
1 parent 3c56b3d commit 62815ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Example Playbook
```
- hosts: all
roles:
- { role: tecris.maven, maven_major: 3, maven_version: 3.9.0, maven_home_parent_directory: /opt }
- { role: tecris.maven, maven_major: 3, maven_version: 3.9.1, maven_home_parent_directory: /opt }
```

Role Variables
Expand All @@ -28,9 +28,9 @@ Role Variables
|*Variable* | *Default Value* |*Description* |
| --- | --- | --- |
| maven_major | 3 | MAJOR [version](http://semver.org/) |
| maven_version | 3.9.0 | Version number|
| maven_version | 3.9.1 | Version number|
| maven_home_parent_directory | /opt | MAVEN_HOME parent directory|
| maven_download_url |http://www.apache.org/dist/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz| If using mirror/proxy (see ansible [get_url](http://docs.ansible.com/ansible/latest/get_url_module.html)) |
| maven_download_url |http://www.apache.org/dist/maven/maven-3/3.9.1/binaries/apache-maven-3.9.1-bin.tar.gz| If using mirror/proxy (see ansible [get_url](http://docs.ansible.com/ansible/latest/get_url_module.html)) |
|maven_download_username||see ansible [get_url](http://docs.ansible.com/ansible/latest/get_url_module.html) url_username option|
|maven_download_password||see ansible [get_url](http://docs.ansible.com/ansible/latest/get_url_module.html) url_password option|

Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# defaults file for apache-maven
maven_major: 3
maven_version: 3.9.0
maven_version: 3.9.1
maven_home_parent_directory: /opt
maven_file_name: apache-maven-{{ maven_version }}-bin.tar.gz
maven_download_url: 'http://www.apache.org/dist/maven/maven-{{ maven_major }}/{{ maven_version }}/binaries/{{ maven_file_name }}'
Expand Down
6 changes: 2 additions & 4 deletions molecule/resources/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ def test_maven_path(host):

assert f.mode == 0o644

assert f.contains("M2_HOME=/opt/apache-maven-3.9.0")
assert f.contains("M2_HOME=/opt/apache-maven-3.9.1")
assert f.contains("PATH=$PATH:$M2_HOME/bin")

def test_maven_installed(host):
"""Validate maven installation."""
cmd = host.run(". /etc/profile.d/java.sh && . /etc/profile.d/maven.sh && mvn --version")

# assert host.check_output(". /etc/profile.d/java.sh && . /etc/profile.d/maven.sh && mvn --version") == multiline_string
assert cmd.rc == 0
assert cmd.succeeded
#assert cmd.stdout.contains("test")
assert host.check_output(". /etc/profile.d/java.sh && . /etc/profile.d/maven.sh && mvn --version | grep Apache") == 'Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)'

0 comments on commit 62815ec

Please sign in to comment.