-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
50 lines (48 loc) · 1.34 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'Java Maven Build'
description: 'Maven build using a specific version of the Java JDK'
author: 'offa'
branding:
icon: 'check-circle'
color: 'green'
inputs:
java-version:
description: 'The Java version use'
required: true
pom:
description: 'Path to pom.xml file or directory containing one'
required: false
default: 'pom.xml'
goal:
description: 'Maven goal to execute'
required: false
default: 'verify'
pmd:
description: 'Execute PMD'
required: false
default: false
skip-javadoc:
description: 'Skip generation of JavaDoc'
required: false
default: true
runs:
using: 'composite'
steps:
- name: Checkout
uses: actions/checkout@main
- name: 'Setup jdk-${{ inputs.java-version }}'
uses: actions/setup-java@main
with:
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
cache: 'maven'
- name: 'Setup Maven'
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: 'Maven Build'
run: mvn ${{ inputs.goal }} --file ${{ inputs.pom }} --batch-mode -Dmaven.javadoc.skip=${{ inputs.skip-javadoc }} -V --no-transfer-progress
shell: bash
- name: 'Execute PMD'
if: ${{ inputs.pmd }}
run: mvn pmd:pmd --file ${{ inputs.pom }} --batch-mode --no-transfer-progress
shell: bash