[MWRAPPER-106] Consistent semantics

Open
#327 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
powershell, shell
Domain
build-system

Research direction

Compare the mvnw and mvnw.cmd scripts and the maven-wrapper.properties input handling. Reproduce the duplicate distributionUrl case from the issue, then trace how each wrapper parses the properties file. Done means both scripts have consistent duplicate-property semantics and the wrapper starts Maven without the shown error.

Written by the indexing model from the issue text.

Description

bug priority:major

Delany opened MWRAPPER-106 and commented

Two scripts are provided: mvnw and mvnw.cmd. Presumably the only difference between them is one is used on Linux OS and the other on Windows OS.

They should not have different requirements of the maven-wrapper.properties file, for example.

mvnw allows a property to be repeated, while mvnw.cmd will fail the build with an error if a duplicate is defined:

ConvertFrom-StringData : Data item 'distributionUrl' in line 'distributionUrl=https://nexus.synope.com/repository/tools/maven/apache-maven-3.9.2-SNAPSHOT-bin.zip' is already defined.
At line:54 char:91
+ ... vn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distri ...
+                                            ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ECHO is on.
Cannot start maven from wrapper

Affects: 3.2.0

Dominant language
Java
Stars
254
Forks
78
Avg merge
9h 4m
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/maven-wrapper

All issues in apache/maven-wrapper

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.