Skip to content

Instantly share code, notes, and snippets.

@rhopp
Created January 22, 2020 12:23
Show Gist options
  • Save rhopp/0f37db61dffc47cea223d270dc96545f to your computer and use it in GitHub Desktop.
Save rhopp/0f37db61dffc47cea223d270dc96545f to your computer and use it in GitHub Desktop.
metadata:
name: wksp-kjuo
projects:
- name: java-web-spring
source:
location: 'https://github.com/spring-projects/spring-petclinic.git'
type: git
branch: master
attributes:
persistVolumes: 'false'
components:
- id: redhat/java/latest
memoryLimit: 3000Mi
type: chePlugin
- mountSources: true
endpoints:
- name: 8080/tcp
port: 8080
memoryLimit: 768Mi
type: dockerimage
volumes:
- name: m2
containerPath: /home/user/.m2
alias: tools
image: 'quay.io/eclipse/che-java8-maven:nightly'
env:
- value: ''
name: MAVEN_CONFIG
- 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: JAVA_OPTS
- value: $(JAVA_OPTS)
name: MAVEN_OPTS
apiVersion: 1.0.0
commands:
- name: maven build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/java-web-spring'
type: exec
command: mvn clean install
component: tools
- name: run webapp
actions:
- workdir: '${CHE_PROJECTS_ROOT}/java-web-spring'
type: exec
command: >
java -jar -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 \
target/*.jar
component: tools
- name: Debug remote java application
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}
type: vscode-launch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment