Skip to content

Revive some code fixing old bug 154923 #18

Revive some code fixing old bug 154923

Revive some code fixing old bug 154923 #18

# Copyright (c) 2021 Contributors.
# All rights reserved.
# This program and the accompanying materials are made available
# under the terms of the Eclipse Public License v 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Build AspectJ JDT Core
on:
workflow_dispatch:
inputs:
mavenPhase:
type: choice
description: Maven phase
required: true
default: 'package'
options:
- 'package'
- 'deploy'
push:
branches: [ aspectj ]
pull_request:
branches: [ aspectj ]
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_PHASE: ${{ github.event.inputs.mavenPhase || 'package' }}
steps:
- name: Set Git options
# Check out as-is, commit Unix-style line endings
run: git config --global core.autocrlf input
- name: Checkout
uses: actions/checkout@v3
- name: Set up cache for ~./m2/repository
uses: actions/cache@v3
with:
path: |
~/.m2/repository
!~/.m2/repository/org/aspectj
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ matrix.os }}-java${{ matrix.java }}-
maven-${{ matrix.os }}-
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
- name: Print tool versions
run: |
java -version
mvn --batch-mode --version
- name: Run Maven build, phase '${{ env.MAVEN_PHASE }}'
# TODO:
# - Phase 'deploy' is not working, because it needs credentials for Sonatype Nexus, which are usually
# retrieved from a '<server/>' entry in ~/.m2/settings.xml.
# - Profile 'release' would need a private key. Hence, we cannot use goal 'deploy' here, because Maven Central
# does not accept unsigned artifacts.
run: |
cd org.eclipse.jdt.core
mvn --batch-mode clean $MAVEN_PHASE
cd -