Skip to content

Commit 732131f

Browse files
authored
[java-maven] Use LTS JDK 17 image (#167)
This merges pull request #167 from rm3l/java-maven_bump_jdk_to_17 Signed-off-by: Armel Soro <[email protected]>
2 parents 59b8ee4 + 0b83295 commit 732131f

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
schemaVersion: 2.1.0
2+
metadata:
3+
name: java-maven
4+
displayName: Maven Java
5+
description: Java application based on Maven 3.6 and OpenJDK 17
6+
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
7+
tags:
8+
- Java
9+
- Maven
10+
projectType: Maven
11+
language: Java
12+
version: 1.3.0
13+
starterProjects:
14+
- name: springbootproject
15+
git:
16+
remotes:
17+
origin: 'https://github.com/odo-devfiles/springboot-ex.git'
18+
components:
19+
- name: tools
20+
container:
21+
image: registry.access.redhat.com/ubi9/openjdk-17:1.16-1.1696518670
22+
command: ["tail", "-f", "/dev/null"]
23+
memoryLimit: 512Mi
24+
mountSources: true
25+
endpoints:
26+
- name: http-maven
27+
targetPort: 8080
28+
- exposure: none
29+
name: debug
30+
targetPort: 5858
31+
volumeMounts:
32+
- name: m2
33+
path: /home/user/.m2
34+
env:
35+
- name: DEBUG_PORT
36+
value: '5858'
37+
- name: m2
38+
volume: {}
39+
commands:
40+
- id: mvn-package
41+
exec:
42+
component: tools
43+
workingDir: ${PROJECT_SOURCE}
44+
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
45+
group:
46+
kind: build
47+
isDefault: true
48+
- id: run
49+
exec:
50+
component: tools
51+
workingDir: ${PROJECT_SOURCE}
52+
commandLine: 'java -jar target/*.jar'
53+
group:
54+
kind: run
55+
isDefault: true
56+
- id: debug
57+
exec:
58+
component: tools
59+
workingDir: ${PROJECT_SOURCE}
60+
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
61+
group:
62+
kind: debug
63+
isDefault: true

stacks/java-maven/stack.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: java-maven
2+
description: 'Java application based on Maven and OpenJDK'
3+
displayName: Maven Java
4+
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
5+
versions:
6+
- version: 1.2.0
7+
# 1.3.0: with JDK 17
8+
- version: 1.3.0
9+
default: true # should have one and only one default version

0 commit comments

Comments
 (0)