--- apiVersion: 1.0.0 metadata: generateName: java-jboss-fuse- projects: - name: java-jboss-fuse source: type: git location: 'https://github.com/jboss-fuse/fuse-rest-http-booster/' components: - type: chePlugin id: redhat/java8/latest - type: chePlugin id: redhat/vscode-apache-camel/latest - # NOTE: instead of the old stack-analysis script, should be able to use the latest dependency-analysis plugin instead type: chePlugin id: redhat/dependency-analytics/latest - type: dockerimage alias: maven image: registry.redhat.io/codeready-workspaces/plugin-java8-rhel8:2.4 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/jboss" - name: MAVEN_OPTS value: $(JAVA_OPTS) memoryLimit: 768Mi endpoints: - name: '8080' port: 8080 mountSources: true volumes: - name: m2 containerPath: /home/jboss/.m2 commands: - name: 1. Build actions: - type: exec component: maven command: "MAVEN_OPTS='-Xmx200m' && mvn clean package" workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse" - name: 2. Run actions: - type: exec component: maven command: "mvn spring-boot:run" workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse" - name: 3. Run in debug mode actions: - type: exec component: maven command: "mvn spring-boot:run -Drun.jvmArguments=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005\"" workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse" - name: 4. Log into deployment cluster actions: - workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse" type: exec command: | echo echo "Before you can deploy this application to an openshift cluster," echo "you must run 'oc login ...' in the maven terminal." echo component: maven - name: 5. Deploy to OpenShift actions: - type: exec component: maven command: "mvn fabric8:deploy -Popenshift -DskipTests" workdir: "${CHE_PROJECTS_ROOT}/java-jboss-fuse" - 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 }] }