#
# Copyright (c) 2012-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#   Red Hat, Inc. - initial API and implementation
#

---
apiVersion: 1.0.0
metadata:
  name: petclinic-dev-environment
projects:
  - name: petclinic
    source:
      type: git
      location: 'git@github.com:spring-projects/spring-petclinic.git'
components:
  - type: cheEditor
    id: eclipse/chetheia/0.0.3
    env:
      - name: ENV_VAR
        value: value
    volumes:
      - name: maven-repo
        containerPath: /root/.m2
    endpoints:
      - name: editor-endpoint
        port: 8088
        attributes:
          discoverable: 'true'
          public: 'false'
          secure: 'true'
  - alias: mvn-stack
    type: chePlugin
    id: eclipse/chemaven-jdk8/1.0.0
  - type: chePlugin
    id: eclipse/chetheia-jdtls/0.0.3
    env:
      - name: ENV_VAR
        value: value
    volumes:
      - name: maven-repo
        containerPath: /root/.m2
    endpoints:
      - name: plugin-endpoint
        port: 8080
        attributes:
          discoverable: 'true'
          public: 'false'
          secure: 'true'
commands:
  - name: build
    actions:
      - type: exec
        component: mvn-stack
        command: mvn package
        workdir: /projects/spring-petclinic
