docs: the PowerShell commands run as written - #506
Merged
Conversation
Both pages gave Windows readers a command that fails. PowerShell splits a -D flag whose property name contains a dot: it hands the native command -Dexec and .mainClass=... as two arguments, and Maven rejects the second with "Unknown lifecycle phase". Quoting the flag fixes it. examples/README.md also claimed the bash form works unchanged on PowerShell. It cannot: the trailing backslash is a continuation PowerShell does not have, so the command runs as two, and the advice about backslash paths was beside the point — forward slashes work fine in -f. benchmarks.md already quoted the flags on its java lines and missed the one on its mvnw line, so the page half-knew.
DemchaAV
force-pushed
the
docs/examples-readme-powershell
branch
from
August 4, 2026 15:03
8decdfd to
6c8b143
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two pages hand Windows readers a command that fails.
PowerShell splits a
-Dflag whose property name contains a dot. Probed directly:Maven then rejects the fragment with
Unknown lifecycle phase ".mainClass=…". A flagwithout a dot before the
=survives, which is why this is easy to miss.examples/README.mdalso told readers "The samemvnw.cmdform works on WindowsPowerShell with backslash paths." It does not. The bash block above it ends a line with
\, which PowerShell has no notion of — it runs./mvnwalone and then looks for acommand named
-Dexec.mainClass=…. And the backslash-paths advice pointed at anon-problem: forward slashes work fine in
-f.docs/operations/benchmarks.mdquotes the flags on itsjavalines and missed the oneon its
mvnwline, so the page half-knew.What
examples/README.md: replaces the false claim with the PowerShell command, one line,flag quoted, and says what goes wrong without each change.
docs/operations/benchmarks.md: quotes-Dmdep.outputFile=…and states the rule,pointing at the
javalines below that already follow it.Tests
Every command in the diff was run on this machine's PowerShell, before and after:
examples/README.mdrun-one-exampleBUILD FAILURE,Unknown lifecycle phase ".mainClass=…"PS_EXIT=0, wrotemodule-first-profile.pdfbenchmarks.mdbuild-classpathBUILD FAILUREBUILD SUCCESS, wrotebenchmarks/target/benchmark.classpath./mvnw -B -ntp clean verify→BUILD SUCCESS.