A second build without clean fails in resources-optimizer-maven-plugin because minified files are minified again
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- build-system
調査の方向性
ルートの pom.xml にある optimizer の resourcesSet と既存の **/jquery*.js の除外から始めます。Issue にある 2 つの Maven コマンドで再現し、最初は clean を付けて、次は付けずに実行します。**/*.min.js と **/*.min.css を除外します。2 回目のビルドが、以前に minify されたファイルを処理せず、JAR に *.min.min.* エントリを追加せずに成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
A second mvn install without clean fails in wicket-extensions, in the resources-optimizer-maven-plugin:
mvn clean install -DskipTests -Pfast -pl wicket-extensions -am # succeeds
mvn install -DskipTests -Pfast -pl wicket-extensions -am # fails
[ERROR] JSC_NON_CONST_DEFINE. @define $jscomp.ASSUME_ES5 has already been set at src/com/google/javascript/jscomp/js/util/defines.js:25:8. at .../wicket-extensions/target/classes/org/apache/wicket/extensions/ajax/veil/wicket-veil.min.js line 1 : 243
...
[ERROR] Failed to execute goal org.primefaces.extensions:resources-optimizer-maven-plugin:2.7.9:optimize (default) on project wicket-extensions: Resources optimization failure: Resources optimization failure. Please fix errors and try again.
Cause
The optimizer reads its input from ${project.build.directory}/classes, the directory it also writes its .min output to, and the root pom.xml excludes only **/jquery*.js. On a build without clean, the .min.js and .min.css files of the previous run are therefore minified again, as *.min.min.js and *.min.min.css. The log of the second run shows it, e.g. Optimize JS file wicket-ajax-jquery.min.js ....
Most files survive being minified twice, but wicket-veil.js uses for ... of with destructuring, so Closure injects its $jscomp polyfills, including @define constants, into wicket-veil.min.js. Compiling that output again redefines those constants, which Closure reports as an error.
Modules that do get past the optimizer ship the doubled files: after the second run, the installed wicket-core jar contains 9 *.min.min.* entries, e.g. wicket-ajax-jquery.min.min.js.
CI always builds from a clean checkout, so it never sees this.
Suggested fix
Exclude **/*.min.js and **/*.min.css in the optimizer's resourcesSet in the root pom.xml, next to the existing **/jquery*.js exclusion.
This replaces #1718, whose title describes this problem but whose description is about an unrelated javadoc failure.
- 主要言語
- Java
- スター
- 799
- フォーク
- 421
- 平均マージ
- 20時間 5分
- マージ済み PR(30日)
- 125
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/wicket のほかの issue
-
COOP and COEP exemptions compare with the context path, so page exemptions never match対応中かも @asvanberg が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
apache/wicket#1661 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The CSP report-uri is lost in development mode because strict() clears it再び着手できるかも @VelpulaGangavardhan が 21 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/wicket#1660 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/wicket#1567 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug key bindings source editor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Visual COBOL: missing 11.0 and 12.0, and 9.0 date differs from Rocket Software's lifecycle pageオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
endoflife-date/endoflife.date#11561 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
conductor-oss/conductor#1824 ·
メンテナーはふだん 5 日以内に返信
-
Type: Possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
AntennaPod/AntennaPod#8887 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信