Enabling Maven builds for push and pull requests on Ubuntu in the GitHub cloud
This commit is contained in:
22
.github/workflows/maven.yml
vendored
Normal file
22
.github/workflows/maven.yml
vendored
Normal 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'
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn -B package --file pom.xml
|
||||||
@@ -13,9 +13,9 @@
|
|||||||
<version>2.5.8-SNAPSHOT</version>
|
<version>2.5.8-SNAPSHOT</version>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -101,8 +101,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<toolchains>
|
<toolchains>
|
||||||
<jdk>
|
<jdk>
|
||||||
<version>1.8</version>
|
<version>8</version>
|
||||||
<vendor>openjdk</vendor>
|
<vendor>adopt</vendor>
|
||||||
</jdk>
|
</jdk>
|
||||||
</toolchains>
|
</toolchains>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -45,9 +45,9 @@
|
|||||||
<github.global.server>github</github.global.server>
|
<github.global.server>github</github.global.server>
|
||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||||||
<!-- Skip error check for javadoc -->
|
<!-- Skip error check for javadoc -->
|
||||||
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<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 -->
|
<maven.deploy.skip>true</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
@@ -138,8 +138,8 @@
|
|||||||
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
|
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
|
||||||
mvn clean compile assembly:single -->
|
mvn clean compile assembly:single -->
|
||||||
<!-- or whatever version you use -->
|
<!-- or whatever version you use -->
|
||||||
<source>1.8</source>
|
<source>8</source>
|
||||||
<target>1.8</target>
|
<target>8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -156,8 +156,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<toolchains>
|
<toolchains>
|
||||||
<jdk>
|
<jdk>
|
||||||
<version>1.8</version>
|
<version>8</version>
|
||||||
<vendor>openjdk</vendor>
|
<vendor>adopt</vendor>
|
||||||
</jdk>
|
</jdk>
|
||||||
</toolchains>
|
</toolchains>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -192,8 +192,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<toolchains>
|
<toolchains>
|
||||||
<jdk>
|
<jdk>
|
||||||
<version>1.8</version>
|
<version>8</version>
|
||||||
<vendor>openjdk</vendor>
|
<vendor>adopt</vendor>
|
||||||
</jdk>
|
</jdk>
|
||||||
</toolchains>
|
</toolchains>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.deploy.skip>false
|
<maven.deploy.skip>false
|
||||||
</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
|
</maven.deploy.skip><!-- do deploy to maven central, parent project does not and inherits -->
|
||||||
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
<maven.compiler.compilerVersion>8</maven.compiler.compilerVersion>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -156,8 +156,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<toolchains>
|
<toolchains>
|
||||||
<jdk>
|
<jdk>
|
||||||
<version>1.8</version>
|
<version>8</version>
|
||||||
<vendor>openjdk</vendor>
|
<vendor>adopt</vendor>
|
||||||
</jdk>
|
</jdk>
|
||||||
</toolchains>
|
</toolchains>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -173,8 +173,8 @@
|
|||||||
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
|
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
|
||||||
mvn clean compile assembly:single -->
|
mvn clean compile assembly:single -->
|
||||||
<!-- or whatever version you use -->
|
<!-- or whatever version you use -->
|
||||||
<source>1.8</source>
|
<source>8</source>
|
||||||
<target>1.8</target>
|
<target>8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- /ZUV -->
|
<!-- /ZUV -->
|
||||||
|
|||||||
Reference in New Issue
Block a user