Skip to content

Commit eaba8b9

Browse files
authored
Update Maven Java stack (#412)
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
1 parent e6b090b commit eaba8b9

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

stacks/java-maven/1.3.1/devfile.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
schemaVersion: 2.2.2
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.1
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.17-1.1705573248
22+
command: ["tail", "-f", "/dev/null"]
23+
memoryLimit: 512Mi
24+
mountSources: true
25+
endpoints:
26+
- name: https-maven
27+
targetPort: 8080
28+
protocol: https
29+
- exposure: none
30+
name: debug
31+
targetPort: 5858
32+
volumeMounts:
33+
- name: m2
34+
path: /home/user/.m2
35+
env:
36+
- name: DEBUG_PORT
37+
value: '5858'
38+
- name: m2
39+
volume: {}
40+
commands:
41+
- id: mvn-package
42+
exec:
43+
component: tools
44+
workingDir: ${PROJECT_SOURCE}
45+
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
46+
group:
47+
kind: build
48+
isDefault: true
49+
- id: run
50+
exec:
51+
component: tools
52+
workingDir: ${PROJECT_SOURCE}
53+
commandLine: 'java -jar target/*.jar'
54+
group:
55+
kind: run
56+
isDefault: true
57+
- id: debug
58+
exec:
59+
component: tools
60+
workingDir: ${PROJECT_SOURCE}
61+
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
62+
group:
63+
kind: debug
64+
isDefault: true

stacks/java-maven/stack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ versions:
66
- version: 1.2.0
77
# 1.3.0: with JDK 17
88
- version: 1.3.0
9+
- version: 1.3.1
910
default: true # should have one and only one default version

0 commit comments

Comments
 (0)