Merge pull request #298 from svanteschubert/Java_CI_with_Maven

Enabling Maven builds for push and pull requests in Github Cloud
This commit is contained in:
Jochen Staerk
2022-11-26 11:25:29 +01:00
committed by GitHub
5 changed files with 43 additions and 21 deletions

22
.github/workflows/maven.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
# 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
# For setup-java see: https://github.com/actions/setup-java#Usage
name: Java CI with Maven
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3 # the log states the default ~/.m2/toolchains.xml is being created pointing to the JDK
with:
distribution: 'adopt' # for latest JDKs use temurin https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/
java-version: '8'
cache: 'maven' #cache/restore any dependencies to improve the workflow execution time
- name: Build with Maven
run: mvn -B package --file pom.xml

View File

@@ -13,9 +13,9 @@
<version>2.5.8-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
@@ -101,8 +101,8 @@
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>openjdk</vendor>
<version>8</version>
<vendor>adopt</vendor>
</jdk>
</toolchains>
</configuration>

View File

@@ -45,9 +45,9 @@
<github.global.server>github</github.global.server>
<additionalparam>-Xdoclint:none</additionalparam>
<!-- Skip error check for javadoc -->
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.deploy.skip>true</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
</properties>
@@ -138,8 +138,8 @@
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
mvn clean compile assembly:single -->
<!-- or whatever version you use -->
<source>1.8</source>
<target>1.8</target>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
@@ -156,8 +156,8 @@
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>openjdk</vendor>
<version>8</version>
<vendor>adopt</vendor>
</jdk>
</toolchains>
</configuration>

View File

@@ -192,8 +192,8 @@
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>openjdk</vendor>
<version>8</version>
<vendor>adopt</vendor>
</jdk>
</toolchains>
</configuration>

View File

@@ -29,9 +29,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>false
</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
@@ -156,8 +156,8 @@
<configuration>
<toolchains>
<jdk>
<version>1.8</version>
<vendor>openjdk</vendor>
<version>8</version>
<vendor>adopt</vendor>
</jdk>
</toolchains>
</configuration>
@@ -173,8 +173,8 @@
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
mvn clean compile assembly:single -->
<!-- or whatever version you use -->
<source>1.8</source>
<target>1.8</target>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<!-- /ZUV -->