[MWRAPPER-142] distributionUrl could be interpolated with env variables

Open
#282 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
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Start with .mvn/wrapper/maven-wrapper.properties and trace how its distributionUrl value is consumed before the Maven distribution download. Confirm the ARTIFACTORY_URL environment variable is expanded in the URL, while preserving existing behavior for ordinary distribution URLs.

Written by the indexing model from the issue text.

Description

enhancement priority:major

Philippe GRANET opened MWRAPPER-142 and commented

The contents of the settings.xml can be interpolated using the following expressions:

  1. {}${user.home{}} and all other system properties (since Maven 3.0)
  2. {}${env.HOME{}} etc. for environment variables

I try the same with .mvn/wrapper/maven-wrapper.properties, but actually, if you put this conf in maven-wrapper.properties :

distributionUrl=https://${ARTIFACTORY_URL}/artifactory/remote-maven-central/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip 

it generate this error:

wget: Failed to fetch https://${ARTIFACTORY_URL}/artifactory/remote-maven-central/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip

ARTIFACTORY_URL env variable is not replaced


1 votes, 2 watchers

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.