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

Fix maven daemon detection on windows platform #3767

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

philippefichet
Copy link
Contributor

In the "bin" folder of "mvnd-0.7.1-windows-amd64" (latest current release), the list of files is as follows:

├── mvnd-bash-completion.bash
├── mvnd-sync.exe
├── mvnd.cmd
├── mvnd.exe
└── mvnd.sh

I take the liberty of adding the suffix ".cmd" when detecting under windows only

@mbien mbien added the Maven [ci] enable "build tools" tests label Mar 11, 2022
@mbien mbien added this to the NB14 milestone Mar 11, 2022
Comment on lines 47 to 48
String mavenDaemonSuffixDetection = Utilities.isWindows() ? ".cmd" : "";
String ex = Files.exists(Paths.get(mavenHome.getPath(), "bin", "mvnd" + mavenDaemonSuffixDetection)) ? "mvnd" : "mvn"; //NOI18N
Copy link
Member

Choose a reason for hiding this comment

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

i think we should probe here for mvnd.exe instead of .cmd because mvnd is a binary. It is not super important but it would make it symmetrical.

Thanks for fixing this for windows btw. Feel free to force push.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change done :)

Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

thanks for the fix. looks good.

@matthiasblaesing
Copy link
Contributor

Looks also sane to me. Lets get this in.

@matthiasblaesing
Copy link
Contributor

Ah - minimal nitpick: @philippefichet could you please squash the two commits into one?

@philippefichet
Copy link
Contributor Author

@matthiasblaesing squash is done ;) (sorry for the delay)

@matthiasblaesing
Copy link
Contributor

After 4 tries, travis is also happy. Lets get this in. Thank you.

@matthiasblaesing matthiasblaesing merged commit 9899586 into apache:master Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maven [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants