Update mvn compiler plugin in root pom.xml to run with java 11 (#390) #189
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- '[0-9]+.[0-9]+*' | |
pull_request: | |
branches: | |
- master | |
- '[0-9]+.[0-9]+*' | |
jobs: | |
# Run build and test | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B clean install -Ph2_disk,auditing # running the test build with the h2 disk profile and auditing too. | |
## Only on push event, publish on geosolutions maven repo | |
publish: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' && github.repository == 'geosolutions-it/geostore' }} | |
needs: build | |
concurrency: ci-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
server-id: geosolutions | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Publish package | |
run: mvn clean install deploy -Ppostgres # published version includes only the postgres drivers. Auditing module is not added to the published version. | |
env: | |
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }} |