che: Importing spring/pet-clinic in the default java-maven stack does not behave properly

Describe the bug

Importing spring/pet-clinic in the default java-maven stack does not behave properly It is not possible to build the project properly, it is not possible to run the project.

The error reported is:

[ERROR] Unknown lifecycle phase "/home/user/.m2". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

  1. Create a workspace from the java-maven stack
  2. Open a terminal and do a git clone of https://github.com/spring-projects/spring-petclinic
  3. Stil from the terminal, try to run the commands provided in the readme of the project.

Expected behavior

It builds, it runs

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Screenshots

Installation method

  • chectl
  • che-operator
  • minishift-addon
  • I don’t know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 28 (28 by maintainers)

Commits related to this issue

Most upvoted comments

The problem is that maven-wrapper which provides executed mvnw and maven docker image use the same name of environment variable - MAVEN_CONFIG. This variable is set in devfile with value /home/user/.m2 and this value isn’t valid for mvnw.

@l0rd @amisevsk @tsmaeder do we really need MAVEN_CONFIG in our devfiles?