Skip to content

Commit fce88d9

Browse files
authored
Merge pull request #1944 from venmanyarun/honor_toolchain_v1
Add Toolchain parameter for Ci.Maven
2 parents 6307066 + d38336b commit fce88d9

File tree

34 files changed

+2291
-106
lines changed

34 files changed

+2291
-106
lines changed

.github/workflows/maven.yml

Lines changed: 192 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -26,69 +26,114 @@ jobs:
2626
RUNTIME_VERSION: [25.0.0.9,25.0.0.10]
2727
java: [25, 21, 17, 11, 8]
2828
exclude:
29-
- java: 8
30-
RUNTIME: wlp
31-
- java: 17
32-
RUNTIME: wlp
33-
- java: 11
34-
RUNTIME: ol
35-
- java: 21
36-
RUNTIME: ol
37-
- RUNTIME_VERSION: 25.0.0.9
38-
java: 25
39-
- RUNTIME_VERSION: 25.0.0.10
40-
java: 21
41-
- RUNTIME_VERSION: 25.0.0.10
42-
java: 17
43-
- RUNTIME_VERSION: 25.0.0.10
44-
java: 11
45-
- RUNTIME_VERSION: 25.0.0.10
46-
java: 8
29+
- java: 8
30+
RUNTIME: wlp
31+
- java: 17
32+
RUNTIME: wlp
33+
- java: 11
34+
RUNTIME: ol
35+
- java: 21
36+
RUNTIME: ol
37+
- RUNTIME_VERSION: 25.0.0.9
38+
java: 25
39+
- RUNTIME_VERSION: 25.0.0.10
40+
java: 21
41+
- RUNTIME_VERSION: 25.0.0.10
42+
java: 17
43+
- RUNTIME_VERSION: 25.0.0.10
44+
java: 11
45+
- RUNTIME_VERSION: 25.0.0.10
46+
java: 8
4747
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux
4848
steps:
49-
# Checkout repos
50-
- name: Checkout ci.maven
51-
uses: actions/checkout@v3
52-
- name: Setup Java ${{ matrix.java }}
53-
uses: actions/setup-java@v3
54-
with:
55-
distribution: 'temurin'
56-
java-version: ${{ matrix.java }}
57-
cache: 'maven'
58-
- name: Free disk space ubuntu
59-
uses: jlumbroso/free-disk-space@main
60-
with:
61-
tool-cache: false
62-
large-packages: false
63-
- name: Checkout ci.common
64-
uses: actions/checkout@v3
65-
with:
66-
repository: OpenLiberty/ci.common
67-
path: ci.common
68-
- name: Checkout ci.ant
69-
uses: actions/checkout@v3
70-
with:
71-
repository: OpenLiberty/ci.ant
72-
path: ci.ant
73-
- name: Set up Maven
74-
uses: stCarolas/setup-maven@v4.5
75-
with:
76-
maven-version: 3.9.9
77-
# Install dependencies
78-
- name: Install ci.ant and ci.common
79-
timeout-minutes: 15
80-
run: |
81-
./mvnw -V clean install -f ci.ant --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
82-
./mvnw -V clean install -f ci.common --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
83-
# Run tests that require a minimum of Java 17 or later
84-
- name: Run tests that require a minimum of Java 17 or later
85-
if: ${{ matrix.java != '8' && matrix.java != '11'}}
86-
timeout-minutes: 20
87-
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*,*compile-jsp-source-17-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
88-
# Run tests
89-
- name: Run tests
90-
timeout-minutes: 90
91-
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
49+
# Checkout repos
50+
- name: Checkout ci.maven
51+
uses: actions/checkout@v3
52+
- name: Pre-install JDK 8 (If Not Matrix Version)
53+
if: ${{ matrix.java != '8' }}
54+
uses: actions/setup-java@v4
55+
with:
56+
java-version: '8'
57+
distribution: 'temurin'
58+
- name: Pre-install JDK 11 (If Not Matrix Version)
59+
if: ${{ matrix.java != '11' }}
60+
uses: actions/setup-java@v4
61+
with:
62+
java-version: '11'
63+
distribution: 'temurin'
64+
- name: Pre-install JDK 17 (If Not Matrix Version)
65+
if: ${{ matrix.java != '17' }}
66+
uses: actions/setup-java@v4
67+
with:
68+
java-version: '17'
69+
distribution: 'temurin'
70+
- name: Pre-install JDK 21 (If Not Matrix Version)
71+
if: ${{ matrix.java != '21' }}
72+
uses: actions/setup-java@v4
73+
with:
74+
java-version: '21'
75+
distribution: 'temurin'
76+
- name: Pre-install JDK 25 (If Not Matrix Version)
77+
if: ${{ matrix.java != '25' }}
78+
uses: actions/setup-java@v4
79+
with:
80+
java-version: '25'
81+
distribution: 'temurin'
82+
- name: Setup Java ${{ matrix.java }}
83+
uses: actions/setup-java@v4
84+
with:
85+
distribution: 'temurin'
86+
java-version: ${{ matrix.java }}
87+
cache: 'maven'
88+
- name: Verify JAVA_HOME and Installed JDKs
89+
run: |
90+
echo "Primary JAVA_HOME is set to: $JAVA_HOME"
91+
java -version
92+
- name: Free disk space ubuntu
93+
uses: jlumbroso/free-disk-space@main
94+
with:
95+
tool-cache: false
96+
large-packages: false
97+
- name: Verify ~/.m2/toolchains.xml content
98+
run: |
99+
echo "Checking for toolchains.xml in: $HOME/.m2/"
100+
ls -l $HOME/.m2/toolchains.xml 2> /dev/null || echo "File does not exist or permission denied."
101+
echo "--- toolchains.xml content ---"
102+
if [ -f $HOME/.m2/toolchains.xml ]; then
103+
cat $HOME/.m2/toolchains.xml
104+
else
105+
echo "Cannot display content: $HOME/.m2/toolchains.xml not found."
106+
fi
107+
echo "----------------------------"
108+
- name: Checkout ci.common
109+
uses: actions/checkout@v3
110+
with:
111+
repository: OpenLiberty/ci.common
112+
path: ci.common
113+
- name: Checkout ci.ant
114+
uses: actions/checkout@v3
115+
with:
116+
repository: OpenLiberty/ci.ant
117+
path: ci.ant
118+
- name: Set up Maven
119+
uses: stCarolas/setup-maven@v4.5
120+
with:
121+
maven-version: 3.9.9
122+
# Install dependencies
123+
- name: Install ci.ant and ci.common
124+
timeout-minutes: 15
125+
run: |
126+
./mvnw -V clean install -f ci.ant --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
127+
./mvnw -V clean install -f ci.common --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
128+
# Run tests that require a minimum of Java 17 or later
129+
- name: Run tests that require a minimum of Java 17 or later
130+
if: ${{ matrix.java != '8' && matrix.java != '11'}}
131+
timeout-minutes: 20
132+
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*,*compile-jsp-source-17-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
133+
# Run tests
134+
- name: Run tests
135+
timeout-minutes: 90
136+
run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
92137

93138
# WINDOWS BUILD
94139
build-windows:
@@ -122,43 +167,89 @@ jobs:
122167
java: 8
123168
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows
124169
steps:
125-
# Checkout repos
126-
- name: Checkout ci.maven
127-
uses: actions/checkout@v3
128-
- name: Setup Java ${{ matrix.java }}
129-
uses: actions/setup-java@v3
130-
with:
131-
distribution: 'temurin'
132-
java-version: ${{ matrix.java }}
133-
cache: 'maven'
134-
# Clone to same github workspace used for ci.maven checkout
135-
- name: Clone ci.ant and ci.common repos to github.workspace
136-
run: |
137-
echo ${{github.workspace}}
138-
git clone https://github.com/OpenLiberty/ci.common.git ${{github.workspace}}/ci.common
139-
git clone https://github.com/OpenLiberty/ci.ant.git ${{github.workspace}}/ci.ant
140-
- name: Set up Maven
141-
uses: stCarolas/setup-maven@v4.5
142-
with:
143-
maven-version: 3.9.9
144-
# Install ci.ant
145-
- name: Install ci.ant
146-
working-directory: ${{github.workspace}}/ci.ant
147-
timeout-minutes: 15
148-
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
149-
# Install ci.common
150-
- name: Install ci.common
151-
working-directory: ${{github.workspace}}/ci.common
152-
timeout-minutes: 15
153-
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
154-
# Run tests that require a minimum of Java 17 or later
155-
- name: Run tests that require a minimum of Java 17 or later
156-
working-directory: ${{github.workspace}}
157-
if: ${{ matrix.java != '8' && matrix.java != '11'}}
158-
timeout-minutes: 45
159-
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*,*compile-jsp-source-17-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
160-
# Run tests
161-
- name: Run tests
162-
working-directory: ${{github.workspace}}
163-
timeout-minutes: 90
164-
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
170+
# Checkout repos
171+
- name: Checkout ci.maven
172+
uses: actions/checkout@v3
173+
- name: Pre-install JDK 8 (If Not Matrix Version)
174+
if: ${{ matrix.java != '8' }}
175+
uses: actions/setup-java@v4
176+
with:
177+
java-version: '8'
178+
distribution: 'temurin'
179+
- name: Pre-install JDK 11 (If Not Matrix Version)
180+
if: ${{ matrix.java != '11' }}
181+
uses: actions/setup-java@v4
182+
with:
183+
java-version: '11'
184+
distribution: 'temurin'
185+
- name: Pre-install JDK 17 (If Not Matrix Version)
186+
if: ${{ matrix.java != '17' }}
187+
uses: actions/setup-java@v4
188+
with:
189+
java-version: '17'
190+
distribution: 'temurin'
191+
- name: Pre-install JDK 21 (If Not Matrix Version)
192+
if: ${{ matrix.java != '21' }}
193+
uses: actions/setup-java@v4
194+
with:
195+
java-version: '21'
196+
distribution: 'temurin'
197+
- name: Pre-install JDK 25 (If Not Matrix Version)
198+
if: ${{ matrix.java != '25' }}
199+
uses: actions/setup-java@v4
200+
with:
201+
java-version: '25'
202+
distribution: 'temurin'
203+
- name: Setup Java ${{ matrix.java }}
204+
uses: actions/setup-java@v4
205+
with:
206+
distribution: 'temurin'
207+
java-version: ${{ matrix.java }}
208+
cache: 'maven'
209+
- name: Verify JAVA_HOME and Installed JDKs
210+
run: |
211+
echo "Primary JAVA_HOME is set to: $JAVA_HOME"
212+
java -version
213+
- name: Verify ~/.m2/toolchains.xml content
214+
shell: bash
215+
run: |
216+
echo "Checking for toolchains.xml in: $HOME/.m2/"
217+
ls -l $HOME/.m2/toolchains.xml 2> /dev/null || echo "File does not exist or permission denied."
218+
echo "--- toolchains.xml content ---"
219+
if [ -f $HOME/.m2/toolchains.xml ]; then
220+
cat $HOME/.m2/toolchains.xml
221+
else
222+
echo "Cannot display content: $HOME/.m2/toolchains.xml not found."
223+
fi
224+
echo "----------------------------"
225+
# Clone to same github workspace used for ci.maven checkout
226+
- name: Clone ci.ant and ci.common repos to github.workspace
227+
run: |
228+
echo ${{github.workspace}}
229+
git clone https://github.com/OpenLiberty/ci.common.git ${{github.workspace}}/ci.common
230+
git clone https://github.com/OpenLiberty/ci.ant.git ${{github.workspace}}/ci.ant
231+
- name: Set up Maven
232+
uses: stCarolas/setup-maven@v4.5
233+
with:
234+
maven-version: 3.9.9
235+
# Install ci.ant
236+
- name: Install ci.ant
237+
working-directory: ${{github.workspace}}/ci.ant
238+
timeout-minutes: 15
239+
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
240+
# Install ci.common
241+
- name: Install ci.common
242+
working-directory: ${{github.workspace}}/ci.common
243+
timeout-minutes: 15
244+
run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -DskipTests
245+
# Run tests that require a minimum of Java 17 or later
246+
- name: Run tests that require a minimum of Java 17 or later
247+
working-directory: ${{github.workspace}}
248+
if: ${{ matrix.java != '8' && matrix.java != '11'}}
249+
timeout-minutes: 45
250+
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -D"invoker.test"="*setup*,*springboot-3-*,*compile-jsp-source-17-*" -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"
251+
# Run tests
252+
- name: Run tests
253+
working-directory: ${{github.workspace}}
254+
timeout-minutes: 90
255+
run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogsOnFailures"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"

liberty-maven-plugin/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
<configuration>
313313
<pomExcludes>
314314
<pomExclude>dev-it/pom.xml</pomExclude>
315+
<pomExclude>toolchain-run-it/pom.xml</pomExclude>
315316
<pomExclude>dev-container-it/pom.xml</pomExclude>
316317
<pomExclude>generate-features-it/pom.xml</pomExclude>
317318
<pomExclude>binary-scanner-it/pom.xml</pomExclude>
@@ -352,6 +353,7 @@
352353
<configuration>
353354
<pomExcludes>
354355
<pomExclude>dev-it/pom.xml</pomExclude>
356+
<pomExclude>toolchain-run-it/pom.xml</pomExclude>
355357
<pomExclude>dev-container-it/pom.xml</pomExclude>
356358
<pomExclude>basic-it/pom.xml</pomExclude>
357359
<pomExclude>assembly-it/pom.xml</pomExclude>

0 commit comments

Comments
 (0)