@@ -21,24 +21,17 @@ jobs:
21
21
# The type of runner that the job will run on
22
22
runs-on : ubuntu-latest
23
23
env :
24
- JAVA_HOME : /usr/lib/jvm/java-1.8.0-openjdk-amd64
25
24
M2_HOME : /opt/apache-maven-3.6.3
26
25
MAVEN_HOME : /opt/apache-maven-3.6.3
27
26
28
27
# Steps represent a sequence of tasks that will be executed as part of the job
29
28
steps :
30
29
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31
30
- uses : actions/checkout@v3
32
-
33
- # Runs a set of commands using the runners shell
34
- # Run before every job
35
- - name : Install Java
36
- run : |
37
- sudo apt-get update
38
- sudo apt-get install -y openjdk-8-jdk
39
- java -version
40
- uname -a
41
- chmod +x pom.xml
31
+ - uses : actions/setup-java@v3
32
+ with :
33
+ distribution : ' temurin'
34
+ java-version : ' 17'
42
35
43
36
- name : Install Maven
44
37
shell : bash
@@ -65,25 +58,17 @@ jobs:
65
58
runs-on : ubuntu-latest
66
59
67
60
env :
68
- JAVA_HOME : /usr/lib/jvm/java-1.8.0-openjdk-amd64
69
61
M2_HOME : /opt/apache-maven-3.6.3
70
62
MAVEN_HOME : /opt/apache-maven-3.6.3
71
63
72
64
# Steps represent a sequence of tasks that will be executed as part of the job
73
65
steps :
74
66
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
75
67
- uses : actions/checkout@v3
76
-
77
- # Runs a set of commands using the runners shell
78
- # Run before every job
79
- - name : Install Java
80
- run : |
81
- sudo apt-get update
82
- sudo apt-get install -y openjdk-8-jdk
83
- java -version
84
- uname -a
85
- chmod +x pom.xml
86
- mvn --version
68
+ - uses : actions/setup-java@v3
69
+ with :
70
+ distribution : ' temurin'
71
+ java-version : ' 17'
87
72
88
73
- name : Install Maven
89
74
shell : bash
@@ -110,25 +95,17 @@ jobs:
110
95
# The type of runner that the job will run on
111
96
runs-on : ubuntu-latest
112
97
env :
113
- JAVA_HOME : /usr/lib/jvm/java-1.8.0-openjdk-amd64
114
98
M2_HOME : /opt/apache-maven-3.6.3
115
99
MAVEN_HOME : /opt/apache-maven-3.6.3
116
100
117
101
# Steps represent a sequence of tasks that will be executed as part of the job
118
102
steps :
119
103
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
120
104
- uses : actions/checkout@v3
121
-
122
- # Runs a set of commands using the runners shell
123
- # Run before every job
124
- - name : Install Java
125
- run : |
126
- sudo apt-get update
127
- sudo apt-get install -y openjdk-8-jdk
128
- java -version
129
- uname -a
130
- chmod +x pom.xml
131
- mvn --version
105
+ - uses : actions/setup-java@v3
106
+ with :
107
+ distribution : ' temurin'
108
+ java-version : ' 17'
132
109
133
110
- name : Install Maven
134
111
shell : bash
0 commit comments