-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix gradlew
commands on Windows
#77
Comments
I am still unable to run from windows. The instruction from https://github.com/open-telemetry/opentelemetry-demo-webstore#gradle-update-windows-only also does not help.
|
@cijothomas Does running |
Seems to potentially be an issue between mac & windows ending characters for the gradlew file. I fixed it by changing the ending character in notepad++ to Unix lf |
Has this been fixed @mic-max? I know we have the readme windows guidance |
I'm not sure, I haven't done any related change recently since I'm not able to reproduce the problem anymore.. |
https://github.com/open-telemetry/opentelemetry-demo#gradle-update-windows-only This section does not work in windows. pasting few lines from the error I see: C:\repos\opentelemetry-demo\src\adservice>.\gradlew installDist
|
Since the issue is not fixed, I'd suggest to keep this open. |
Did you try changing the file ending @cijothomas ? I’m unable to reproduce |
No |
Hi expert, I have the same issue when building the adservice from Windows.if changing ending character can solve the problem, which gradle file is related to do ? I can help to test |
@echuang81 check out the last comment on this stackoverflow post. It worked for me. https://stackoverflow.com/questions/70844518/cant-run-gradle-wrapper-with-docker-build |
Also try this if you haven’t yet: https://github.com/open-telemetry/opentelemetry-demo#gradle-update-windows-only |
Hi @cartersocha, thanks for your guidance. I tried re-clone with configuration autocrlf input set, as well as converting EOL to LF only character. Unfortunately, both also not working. hmm...... |
What is the state of this issue? I'm receiving the same error as @cijothomas while building in a clean ubuntu vm. |
I've solved this multiple times on my surface windows 11 by following these instructions. Not sure what others are encountering. I believe it's the file ending character causing problems but unsure how to fix for all or if that's the only problem. I clone the repo, run docker compose build, it fails, change the gradlew that has no file ending by following below steps, then run docker compose build again & it works. 🤷♂️ @mic-max, @puckpuck "Converting EOL to UNIX (LF) of the gradlew file should work. It can be fixed using notepad++. Open the gradlew file in notepad++ Edit -> EOL Conversion -> UNIX (LF) save" |
We discussed this in the sig meeting today. Was the resolution adding a comment to the gradlew file or EOF character or something else? @puckpuck |
@echuang81 , @joshleecreates 90% chance it's a file ending issue. Please try this solution or this one and report if either works! |
Closing as this has now been solved to our knowledge. https://github.com/open-telemetry/opentelemetry-demo/blob/main/docs/docker_deployment.md#windows-pre-requisites |
=> ERROR [ghcr.io/open-telemetry/demo:v0.3.4-adservice builder 6/7] RUN ./gradlew downloadRepos 0.9s
|
My bad. It does work with the newest instruction. I missed the part about "delete and re-clone the repo". |
All good :) glad we got this fully closed! |
The
adservice
fails to build at theRUN ./gradlew downloadRepos
stepYou must run
./gradlew installDist
from/src/adservice/
./gradlew wrapper --gradle-version 7.4.2
Maybe only one of the above commands is necessary...
Then the following command should work:
docker compose build cartservice
Proposed Fix:
Make the
docker compose up
the only required command to run the whole project, so this might be simply upgrading the jar file:/src/adservice/gradle/wrapper/gradle-wrapper.jar
to the7.4.2
version done in the command found above.The other changes to
/src/adservice/gradle/wrapper/gradle-wrapper.properties
and/src/adservice/gradlew
are only related to line endings:The text was updated successfully, but these errors were encountered: