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
- Create a workspace from the java-maven stack
- Open a terminal and do a git clone of https://github.com/spring-projects/spring-petclinic
- 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 versionandkubectl version) - minishift (include output of
minishift versionandoc version) - docker-desktop + K8S (include output of
docker versionandkubectl 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
- fix mvnw & maven docker image incompat https://issues.jenkins.io/browse/JENKINS-47890 https://github.com/eclipse/che/issues/13926 — committed to danielnorberg/auto-matter by danielnorberg 3 years ago
- trying to fix the issue with Unknown lifecycle phase /root/.m2 see https://github.com/eclipse/che/issues/13926 — committed to v1v/ecommerce-antifraud by v1v 2 years ago
- Trying to work around unknown lifecyle issue https://github.com/eclipse/che/issues/13926 — committed to CodeSecure-SE/spring-petclinic by markhermelinggt 9 months ago
The problem is that maven-wrapper which provides executed
mvnwand maven docker image use the same name of environment variable - MAVEN_CONFIG. This variable is set in devfile with value/home/user/.m2and this value isn’t valid formvnw.@l0rd @amisevsk @tsmaeder do we really need MAVEN_CONFIG in our devfiles?