name: "Build Schema Generator"
description: "Builds the Debezium Schema Generator"

inputs:
  maven-cache-key:
    description: "The maven build cache key"
    required: true
  shell:
    description: "The shell to use"
    required: false
    default: bash

runs:
  using: "composite"
  steps:
    - uses: ./.github/actions/setup-java

    - uses: ./.github/actions/maven-cache
      with:
        key: ${{ inputs.maven-cache-key }}

    - name: Build Schema Generator
      shell: ${{ inputs.shell }}
      run: >
        ./mvnw clean install -B -pl debezium-schema-generator -am
        -Dcheckstyle.skip=true
        -Dformat.skip=true
        -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
        -Dmaven.wagon.http.pool=false
        -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
        -Ddebezium.test.mongo.replica.primary.startup.timeout.seconds=120
