gwt-plugins / gwt-plugins/gwt-eclipse-plugin

Maven effective classpath is not honored

オープン
#517 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
116
フォーク
49
PR マージ指標
30日以内にマージされた PR はありません

説明

The plugin seems to be including in the classpath of a DevMode run configuration, modules that are excluded by the Maven structure.

This includes dependencies in the test scope , dependencies marked "optional" and "exclusions"

The result is incompatible versions of classes, the ones excluded by the Maven structure, somehow being loaded first in the classpath causing runtime class loading and access errors.

The workaround I have used is repetition of the offending depedencies with their compatible versions at the beginning of the Maven POM of the module used to create the DevMode run configuration.

However, it is only a workaround requiring special handling and possibly frequent adjustments, making maintenance of projects not straightforward at all.

For example:
Imagine a shared library making use of some Spring Framework 2.6 modules but marking them "optional".
Then a real application makes use of the shared library but uses Spring Framework 7 instead.
It is modules of Spring Framework 2.6 somehow added first to the classpath of the DevMode run configuration even though it is excluded by the Maven structure, followed by some Spring Framework 7 modules.
This is very likely to cause problems at runtime, loading incompatible classes.

The problem is well known for many years but has recently become very intensive.
Would it be possible to consider an alternative method for building the classpath of the DevMode run configuration ? one that includes only the effective Maven dependencies.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

この issue ではファイル、テスト、エントリーポイントが指定されていません。DevMode の実行構成がどのように classpath を構築するかを追跡し、それを Maven の有効な依存関係と比較してください。test スコープ、optional 依存関係、exclusions も対象に含めます。除外されたアーティファクトが生成された classpath に表示されなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
build-system, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。