Skip to content

Commit 35435f0

Browse files
committed
[feature] Show mvnd version in GitHub action
1 parent 11f6d2f commit 35435f0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/actions/install-mvnd/action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
description: 'Set to true to cache Maven Daemon artifacts per-platform-architecture'
1414
required: true
1515
default: 'true'
16+
mvnd-connect-timeout:
17+
description: 'The timeout (as a duration, e.g. `90 seconds`) for connecting to the Maven Daemon'
18+
required: true
19+
default: '90 seconds'
1620
outputs:
1721
mvnd-dir:
1822
description: "The directory where the command mvnd is located"
@@ -64,11 +68,18 @@ runs:
6468
if: steps.cache-mvnd.outputs.cache-hit != 'true'
6569
shell: bash
6670
run: unzip ${{ inputs.install-path }}/${{ env.MVND_NAME }}.zip -d ${{ inputs.install-path }}/
67-
- id: mvnd-location
71+
- name: Show Maven Daemon version
72+
shell: bash
73+
run: |
74+
${{ inputs.install-path }}/${{ env.MVND_NAME }}/bin/mvnd -D'mvnd.connectTimeout=${{ inputs.mvnd-connect-timeout }}' --version
75+
${{ inputs.install-path }}/${{ env.MVND_NAME }}/bin/mvnd -D'mvnd.connectTimeout=${{ inputs.mvnd-connect-timeout }}' --status
76+
- name: Set mvnd-dir
77+
id: mvnd-location
6878
shell: bash
6979
run: |
7080
MVND_BIN_DIR="${{ inputs.install-path }}/${{ env.MVND_NAME }}/bin"
7181
if [ "$RUNNER_OS" == "Windows" ]; then
7282
MVND_BIN_DIR="$(cygpath --absolute --long-name --windows $MVND_BIN_DIR)"
7383
fi
84+
echo "MVND_BIN_DIR=${MVND_BIN_DIR}" >> $GITHUB_ENV
7485
echo "mvnd-dir=${MVND_BIN_DIR}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)