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

Maven effective classpath is not honored

Open
#517 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
117
Forks
49
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.