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

Maven effective classpath is not honored

Offen
#517 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
117
Forks
49
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Verfolge, wie die DevMode-Run-Konfiguration ihren Classpath erstellt, und vergleiche ihn mit den effektiven Maven-Abhängigkeiten, einschließlich des Test-Scope, optionaler Abhängigkeiten und Exclusions; die Aufgabe ist abgeschlossen, wenn ausgeschlossene Artefakte nicht mehr im generierten Classpath erscheinen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
build-system, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.