Skip to content
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

Use quotes for the path to find maven basedir in mvnw #30750

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

rsvoboda
Copy link
Member

@rsvoboda rsvoboda commented Jan 31, 2023

Use quotes for the path to find maven basedir in mvnw

Fixes #30642

Sync with the latest wrapper upstream changes https://github.com/apache/maven-wrapper/blob/master/maven-wrapper-distribution/src/resources/mvnw#L173

CC @jorsol

Old info (see comments for the details):
pwd was used before #30108 changes

apache/maven-wrapper@e87947e changed the line in upstream, imho cosmetic and MWRAPPER-56 unrelated change that caused regression in behavior on Quarkus CLI side

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Jan 31, 2023
@jorsol
Copy link
Contributor

jorsol commented Jan 31, 2023

Thanks, will check and update the upstream project. 👍🏽

Copy link
Contributor

@jorsol jorsol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pwd works when using the quarkus-cli because the wrapper is called with the full path, but the actual fix should be simpler by adding double quotes:

@@ -164,7 +164,7 @@ concat_lines() {
fi
}

BASE_DIR=$(find_maven_basedir "$(dirname $0)")
BASE_DIR=$(find_maven_basedir "$(pwd)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BASE_DIR=$(find_maven_basedir "$(pwd)")
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")

Copy link
Member Author

@rsvoboda rsvoboda Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I tried that but it didn't work for the s p a c e s case.

Will double check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check, I tested it and it works for me.

FTR: This is already fixed upstream and is using the same approach (I even tested the script from the master branch of maven-wrapper and it works).

Copy link
Member Author

@rsvoboda rsvoboda Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR updated, works fine now. I probably combined that change with other experiments.

@rsvoboda rsvoboda changed the title Use pwd to find maven basedir in mvnw Use quotes for the path to find maven basedir in mvnw Jan 31, 2023
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@gsmet gsmet merged commit 9e3cb3e into quarkusio:main Feb 1, 2023
@quarkus-bot quarkus-bot bot added this to the 2.17 - main milestone Feb 1, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 1, 2023

Failing Jobs - Building 00f0fb6

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.BasicJavaMainApplicationModuleDevModeTest.main line 63 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual not to be null

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.BasicJavaMainApplicationModuleDevModeTest.main line 63 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual not to be null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform kind/bugfix
Projects
None yet
3 participants