question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (28 by maintainers)

github_iconTop GitHub Comments

5reactions
svorcommented, Jul 22, 2019

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?

0reactions
svorcommented, Dec 4, 2019

@tsmaeder They do UNSET https://github.com/carlossg/docker-maven/blob/master/jdk-8/mvn-entrypoint.sh#L45, but this code executes as ENTRYPOINT which we override for our dev-container’s image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring PetClinic application showing error in pom.xml
We can fix this issue by simply run the below command from terminal/command prompt: mvn spring-javaformat:apply.
Read more >
Spring Boot Reference Documentation
You do not need to use the CLI to work with Spring Boot, but it is a quick way to get a Spring...
Read more >
Spring Boot, Maven and Eclipse Errors and TroubleShooting ...
Error : On Maven > Update Project, Java 1.4 is auto selected ... Q : Why does Hot reload not work with Spring...
Read more >
Spring Petclinic (2013 version) doesn't work in JBoss AS 7
I'm trying to run the Spring Petclinic example on JBoss AS 7.1.1. I've imported the maven project from ...
Read more >
Java in Gitpod
The default Gitpod workspace image default is workspace-full based on Ubuntu. ... Java, Maven or Gradle versions manually is a quick way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found