only-script for Linux clobbers MVNW_REPOURL
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Affected version
3.3.3
Bug description
Running the Maven Wrapper plugin through the Maven Wrapper's only-script distribution type causes MVNW_REPOURL to be discarded, leaving the distributionUrl written to maven-wrapper.properties at its default value. Consequently, only-script for Linux is unable to update itself in any environment that needs MVNW_REPOURL.
That is, the hypothetical execution
$ MVNW_REPOURL=asdfasdf ./mvnw org.apache.maven.plugins:maven-wrapper-plugin:3.3.3:wrapper -Dtype=only-script -Dmaven=3.9.11 -X
where asdfasdf is a functional mirror should have produced an output similar to
...
[DEBUG] Using repo URL from MVNW_REPOURL environment variable.
[DEBUG] Determined repo URL to use as asdfasdf
[INFO] Configuring .mvn/wrapper/maven-wrapper.properties to use Maven 3.9.11 and download from asdfasdf
but will end up producing
...
[DEBUG] Determined repo URL to use as https://repo.maven.apache.org/maven2
[INFO] Configuring .mvn/wrapper/maven-wrapper.properties to use Maven 3.9.11 and download from https://repo.maven.apache.org/maven2
and the result is consistent with the log messages.
This happens because only-mvnw explicitly unsets MVNW_REPOURL:
so by the time WrapperMojo tries to read the variable it sees null:
As far as I can see, this bug does not exist in only-mvnw.cmd.
The issue is exacerbated by the user property distributionUrl value representing the "final" URl. That is, it is not simply a domain substitution and therefore cannot take the place of MVNW_REPOURL.
- 主要言語
- Java
- スター
- 254
- フォーク
- 78
- 平均マージ
- 23時間 36分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/maven-wrapper のほかの issue
-
mvnw.cmd selects the last matching extracted directory while mvnw selects the first対応中かも @tanvir-ux が 37 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/maven-wrapper#442 ·
メンテナーはふだん 1 日以内に返信
-
priority:trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/maven-wrapper#280 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
apache/maven-wrapper#454 ·
メンテナーはふだん 1 日以内に返信
-
mvnw silently continues when no download mechanism is available (missing final else)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
apache/maven-wrapper#441 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
SHA-256 validation fails when unzip is unavailable because distribution format is silently changed to .tar.gz対応中かも @simono が 77 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/maven-wrapper#425 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
apache/maven-wrapper の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
liquid-java/liquidjava#373 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NationalSecurityAgency/ghidra#9748 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
spring-mcp-tools
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
explyt/spring-plugin#591 ·
メンテナーはふだん 1 日以内に返信