Skip to content

mvnw does not parse maven-wrapper.properties file properly on macos #369

@kumar-github

Description

@kumar-github

Affected version

3.9.11

Bug description

  1. I generated the maven wrapper by executing mvn wrapper:wrapper command.
  2. Used the generated wrapper to clean the project using ./mvnw clean command and it worked.
  3. I formatted my code from my IDE and as part of it, the maven-wrapper.properties file also got formatted like below.

Before formatting:

distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip

After formatting:

distributionType = only-script
distributionUrl  = https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
  1. Space added before and after the = symbol.
  2. ./mvnw clean does not work now saying cannot read distributionUrl property in ./.mvn/wrapper/maven-wrapper.properties

Note:
I use macos 15.5 Sequoia.
I use maven 3.9.11.
I use JDK 21.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions