-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing spring/pet-clinic in the default java-maven stack does not behave properly #13926
Comments
@tsmaeder Could your team take a look on this for initial investigation/estimation/triage? |
The problem is that maven-wrapper which provides executed @l0rd @amisevsk @tsmaeder do we really need MAVEN_CONFIG in our devfiles? |
@svor it was necessary when we were not patching the images. It may be useless now but we need to check. |
@svor what do you mean "they use the same environment variable"? Are you saying that the mvnw script is picking up the value from the env var or that it is overriding the variable? In what way is this causing the build to fail? |
@tsmaeder mvnw is picking up the value:
And the value which was set in devfile ( |
Here is the similar problem: takari/maven-wrapper#128 |
Seems to be well known issue: https://issues.jenkins-ci.org/browse/JENKINS-47890 |
@svor is correct on the underlying issue; the problem is that the Spring sample project we use is incompatible with e.g. the community maven image (which has Should be fixed in eclipse-che/che-devfile-registry#42, which moves away from using |
@amisevsk I was under the impression that setting MAVEN_CONFIG is a workaround for not having a proper home directory. But as I understand it, we patch the image to have a home dir. Why not just remove the MAVEN_CONFIG declaration? |
@tsmaeder Because the way the community maven image is set up is to use [1] - https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image |
I've seen that we moved away from the maven comunity image and use a centos one in some instances. What's the right way to go, @amisevsk ? Because even if we don't use mvnw in our commands, folks are going to use that from the command line. It's what they are used to. |
@tsmaeder To be honest, I'm not sure there is a good solution; As for Che, there are a few things
|
So unless we want to move away from the mvn community image, this is not fixable, really. @slemeur |
@l0rd using community images is a "strategic" goal. Not sure what we want to do with this one. |
This problem is also actual if we want to use vscode-quarkus extension. To run a default example it generates a command which starts with mvnw like |
@svor : Even if the maven community stack we are using is not compatible by default, it seems the user should be able to figure out how to reconfigure the workspace so that it changes the |
@svor : Would using a different image for a Quarkus stack be a solution for that? |
@slemeur To do that we can unset $MAVEN_CONFIG in the devfile, like this: https://github.com/eclipse/che-devfile-registry/blob/sv/quarkus/devfiles/quarkus/devfile.yaml#L28 |
It's kind of a strange issue, and I don't know the best approach in fixing it; the reason From the README for maven-wrapper:
This should not be a concern in Che. On the other hand, |
MAVEN_CONFIG seems to be used in the entry point of the maven image (https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image). Can we be sure that setting the env var to the empty string is not going to break that support? |
Also, doing this from a devfile will not fix the problem when folks are importing their own projects using .mvnw. |
We sure could, but I don't know where. We don't maintain any custom images except for the arbitrary UID patch (which is image-agnostic) -- if we open that to image-specific patches, we're left with the Che 6 scenario of maintaining Dockerfiles for images we use. |
Well, the dockerfile would be specific to the example, not the tooling. It's "bring your own dev image" anyway. |
Let's do the "unset env var in devfile" fix. |
Also, we should file an issue against the maven image. |
carlossg/docker-maven#77 seems to indicate the issue has been fixed a long time ago. @svor can you find out if/why that does not help us? |
@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 |
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:
Che version
Steps to reproduce
Expected behavior
It builds, it runs
Runtime
kubectl version
)oc version
)minikube version
andkubectl version
)minishift version
andoc version
)docker version
andkubectl version
)Screenshots
Installation method
Environment
Additional context
The text was updated successfully, but these errors were encountered: