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

Maven effective classpath is not honored

Abierto
#517 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
117
Forks
49
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

El issue no menciona archivos, pruebas ni puntos de entrada. Rastrea cómo la configuración de ejecución de DevMode construye su classpath y compáralo con las dependencias efectivas de Maven, incluido el alcance de test, las dependencias opcionales y las exclusiones; la tarea estará completada cuando los artefactos excluidos ya no aparezcan en el classpath generado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
build-system, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.