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 Maven wrapper #578

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Use Maven wrapper #578

merged 1 commit into from
Sep 24, 2024

Conversation

lptr
Copy link
Member

@lptr lptr commented Sep 23, 2024

Use it when it is available and a tool path is not specifically configured.

Use it when it is available and a tool path is not specifically configured.
@lptr lptr self-assigned this Sep 23, 2024
@lptr lptr marked this pull request as ready for review September 23, 2024 09:48
@lptr lptr requested a review from asodja September 23, 2024 09:48
}

@OverridingMethodsMustInvokeSuper
protected String getExecutablePathWithoutToolHome(File projectDir) {
Copy link
Member

@asodja asodja Sep 23, 2024

Choose a reason for hiding this comment

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

🤔 What if we pass projectDir to getExecutableName() (and maybe we rename it?) so we have just one method instead of two (and also we can get rid of @OverridingMethodsMustInvokeSuper)?

Copy link
Member Author

Choose a reason for hiding this comment

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

We also use getExecutableName() when looking up the executable from the tool home.

@Override
protected String getExecutablePathWithoutToolHome(File projectDir) {
String wrapperName = OperatingSystem.isWindows()
? "mvnw.cmd"
Copy link
Member

Choose a reason for hiding this comment

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

❓ Should this be mvnw.bat?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's mvnw.cmd, similar to mvn.cmd a few lines above.

Copy link
Member

@asodja asodja left a comment

Choose a reason for hiding this comment

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

LGTM

@lptr lptr merged commit d391e20 into master Sep 24, 2024
8 of 10 checks passed
@lptr lptr deleted the maven/use-wrapper branch September 24, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants