jmarchel f26b01d8e2 Add roles for handling java libraries
With OpenJDK and Maven.

Change-Id: I156d824bab7fdfbe121f5ed4c3a2453c4d7fe848
Depends-On: https://review.opendev.org/c/nebulous/library-template/+/898805
2023-10-19 09:48:32 +00:00

15 lines
454 B
YAML

- hosts: all
roles:
- install_jdk
- maven
tasks:
- name: Build the project with Maven
shell: mvn clean install -DskipTests
args:
chdir: "{{ project_path }}" # Pointing to the directory with pom.xml
vars:
project_path: "{{ zuul.project.src_dir }}/{{ java_library_path }}"
environment:
MAVEN_HOME: "/opt/apache-maven-3.8.8"
PATH: "{{ ansible_env.PATH }}:/opt/apache-maven-3.8.8/bin"