# Copyright (c) 2021 IBM Corporation and others # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. schemaVersion: 2.1.0 metadata: name: java-openliberty version: 0.7.0 displayName: 'Open Liberty Maven' description: Java application Maven-built stack using the Open Liberty runtime icon: https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg tags: ['Java', 'Maven'] language: 'java' projectType: 'openliberty' alpha.build-dockerfile: '{{.OUTERLOOP_DOCKERFILE_MAVEN_LOC}}' alpha.deployment-manifest: '{{.DEVFILE_DEPLOY_YAML_MAVEN_LOC}}' starterProjects: - name: user-app git: remotes: origin: 'https://github.com/OpenLiberty/application-stack-starters.git' components: - name: dev container: # In the original upstream of this devfile, the image used is openliberty/application-stack:, which is built from the repository: https://github.com/OpenLiberty/application-stack image: {{.STACK_IMAGE_MAVEN}} memoryLimit: 1512Mi mountSources: true endpoints: - exposure: public path: / name: ep1 targetPort: 9080 protocol: http commands: - id: build exec: component: dev commandLine: /stack/ol/scripts/maven/devbuild-cmd.sh {{.OL_RUNTIME_VERSION}} workingDir: /projects hotReloadCapable: true group: kind: build isDefault: true - id: run exec: component: dev commandLine: mvn -Dliberty.runtime.version={{.OL_RUNTIME_VERSION}} -Ddebug=false -DhotTests=true -DcompileWait=3 liberty:dev workingDir: /projects hotReloadCapable: true group: kind: run isDefault: true - id: run-test-off exec: component: dev commandLine: mvn -Dliberty.runtime.version={{.OL_RUNTIME_VERSION}} -Ddebug=false liberty:dev workingDir: /projects hotReloadCapable: true group: kind: run isDefault: false - id: debug exec: component: dev commandLine: mvn -Dliberty.runtime.version={{.OL_RUNTIME_VERSION}} -DdebugPort=${DEBUG_PORT} liberty:dev -Dliberty.env.WLP_DEBUG_REMOTE=y workingDir: /projects hotReloadCapable: true group: kind: debug isDefault: true - id: test # The 'test' command requires an already active container. Multi-module apps require compilation is needed prior to processing the tests. exec: component: dev commandLine: mvn compiler:compile failsafe:integration-test failsafe:verify workingDir: /projects hotReloadCapable: true group: kind: test isDefault: true