Last active
October 29, 2019 12:07
-
-
Save rhopp/b8ad2177b6271c1dcd5917d9b1d55bf6 to your computer and use it in GitHub Desktop.
pure java eap image devfile
This file contains hidden or 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: | |
generateName: java-eap-maven- | |
projects: | |
- | |
name: kitchensink-example | |
source: | |
type: git | |
location: "https://github.com/che-samples/kitchensink-example" | |
components: | |
- | |
type: chePlugin | |
id: redhat/java8/latest | |
- | |
type: dockerimage | |
alias: maven | |
image: registry.redhat.io/jboss-eap-7/eap72-openjdk11-openshift-rhel8 | |
env: | |
- name: MAVEN_CONFIG | |
value: /home/jboss/.m2 | |
- name: MAVEN_OPTS | |
value: "-Xmx200m -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/jboss" | |
memoryLimit: 512Mi | |
endpoints: | |
- name: 'eap' | |
port: 8080 | |
mountSources: true | |
volumes: | |
- name: m2 | |
containerPath: /home/jboss/.m2 | |
commands: | |
- | |
name: build | |
actions: | |
- | |
type: exec | |
component: maven | |
command: "mvn clean install" | |
workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example | |
- | |
name: build and run in debug | |
actions: | |
- | |
type: exec | |
component: maven | |
command: "mvn clean install && cp target/*.war /opt/eap/standalone/deployments/ROOT.war && export JAVA_OPTS_APPEND=-Dsun.util.logging.disableCallerCheck=true && /opt/eap/bin/standalone.sh -b 0.0.0.0 --debug 8000" | |
workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example | |
- | |
name: copy war | |
actions: | |
- | |
type: exec | |
component: maven | |
command: "cp target/*.war /opt/eap/standalone/deployments/ROOT.war" | |
workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example | |
- | |
name: hot update | |
actions: | |
- | |
type: exec | |
component: maven | |
command: "mvn clean install && cp target/*.war /opt/eap/standalone/deployments/ROOT.war" | |
workdir: ${CHE_PROJECTS_ROOT}/kitchensink-example | |
- | |
name: dependency analysis | |
actions: | |
- | |
type: exec | |
component: maven | |
command: "${HOME}/stack-analysis.sh -f ${CHE_PROJECTS_ROOT}/kitchensink-example/pom.xml -p ${CHE_PROJECTS_ROOT}/kitchensink-example" | |
- | |
name: Debug (Attach) | |
actions: | |
- type: vscode-launch | |
referenceContent: | | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "java", | |
"request": "attach", | |
"name": "Debug (Attach)", | |
"hostName": "localhost", | |
"port": 8000 | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment