### Affected version 3.3.2 ### Bug description The Powershell part of the only-mvnw.cmd contains tweo bugs: 1. if statement is reversed - should be `if(! $USE_MVND)` (or if and else part must be swapped) https://github.com/apache/maven-wrapper/blob/629ae27d224af93822164450d365930412ffcf9e/maven-wrapper-distribution/src/resources/only-mvnw.cmd#L76 2. The compounded regex pattern does not work. Must be `"^.*$MVNW_REPO_PATTERN"` https://github.com/apache/maven-wrapper/blob/629ae27d224af93822164450d365930412ffcf9e/maven-wrapper-distribution/src/resources/only-mvnw.cmd#L77 This works for me: ``` $MVNW_REPO_PATTERN = if (!$USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" ```
Activity
slawekjaranowski commentedon Aug 25, 2025
fixed in