2022-09-21 15:16:14 +02:00
2021-02-21 00:22:55 +01:00
2022-09-21 15:16:14 +02:00
2021-02-20 21:38:22 +01:00
2021-02-21 00:18:03 +01:00

Maven GAV Extractor

Maven GAV Extractor

This GitHub Action extracts GAV from pom.xml, i.e.:

  • groupId
  • artifactId
  • version

Why should I need this? For example, to name and tag a Docker image built upon your artifact or pass as parameters to a dispatched workflow.

Prerequirements

This action expects you to have maven available in your workflow environment

Inputs

Name Description Default Required
pom-location Full path to your project pom.xml file ${{ github.workspace }}/pom.xml true

Outputs

Name Description
group-id Group Id of your project
artifact-id Artifact Id of your project
version Version of your project

Example usage

name: Sample workflow

on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    name: Should extract GAV
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11
    - name: Extract GAV
      id: extract
      uses: andreacomo/maven-gav-extractor@v1
    - name: Log GAV
      run: |
        echo ${{ steps.extract.outputs.group-id }}
        echo ${{ steps.extract.outputs.artifact-id }}
        echo ${{ steps.extract.outputs.version }}
      shell: bash
Description
Github Action for extracting groupId, artifactId and version (GAV) from pom.xml
https://github.com/marketplace/actions/maven-gav-extractor
Readme MIT 99 KiB