Last active
February 10, 2020 17:57
-
-
Save kadel/d9470b9910c5b64f2f2afbb29305704e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: 1.0.0 | |
metadata: | |
name: petclinic | |
projects: | |
- name: java-web-spring | |
source: | |
type: local | |
location: "./" | |
components: | |
- type: chePlugin | |
id: redhat/java/latest | |
memoryLimit: 1512Mi | |
- type: dockerimage | |
alias: tools | |
mountSources: true | |
image: quay.io/eclipse/che-java8-maven:nightly | |
env: | |
- name: JAVA_OPTS | |
value: | |
"-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | |
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | |
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom | |
-Duser.home=/home/user" | |
- name: MAVEN_OPTS | |
value: $(JAVA_OPTS) | |
memoryLimit: 768Mi | |
endpoints: | |
- name: "8080/tcp" | |
port: 8080 | |
volumes: | |
- name: m2 | |
containerPath: /home/user/.m2 | |
commands: | |
- name: maven build | |
actions: | |
- type: exec | |
component: tools | |
command: "mvn package" | |
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring | |
- name: run webapp | |
actions: | |
- type: exec | |
component: tools | |
command: | | |
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 \ | |
target/*.jar | |
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring | |
- name: Debug remote java application | |
actions: | |
- type: vscode-launch | |
referenceContent: | | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "java", | |
"name": "Debug (Attach) - Remote", | |
"request": "attach", | |
"hostName": "localhost", | |
"port": 5005 | |
}] | |
} | |
- name: springboot run | |
actions: | |
- type: exec | |
component: tools | |
command: "mvn spring-boot:run" | |
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment