Skip to content

Adding parent POM path #68

Adding parent POM path

Adding parent POM path #68

Workflow file for this run

#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright The original authors
#
# Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
#
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v4
with:
submodules: 'true'
- name: 'Cache Maven packages'
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: 'Set up Java 17'
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: 'Build Template'
run: mvn --no-transfer-progress -B --file oss-quickstart-simple-template/pom.xml verify
- name: 'Set up Java 11'
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: 'Build archetype'
run: mvn --no-transfer-progress -B --file pom.xml install
- name: 'Set up Java 17'
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: 'Determine archetype version'
run: echo "ARCHETYPE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: 'Test archetype'
run: mkdir test && cd test && mvn archetype:generate -B -DarchetypeGroupId=org.moditect.ossquickstart -DarchetypeArtifactId=oss-quickstart-simple-archetype -DarchetypeVersion=${{ env.ARCHETYPE_VERSION }} -DgroupId=com.example.demos -DartifactId=fancy-project -Dversion=1.0.0-SNAPSHOT -DmoduleName=com.example.fancy && cd fancy-project && ./mvnw -B verify