Vaadin eclipse plugin shouldn't add VAADIN_DOWNLOAD entries to classpath for Maven projects
|Reported by:||ringerc||Owned by:||ticketmaster|
|Component:||dontuse-Plug-in for Eclipse (Use github.com/vaadin/eclipse-plugin instead)||Version:||6.7.9|
In Properties -> Java Build Path -> Libraries, Vaadin adds a bunch of VAADIN_DOWNLOAD/ entries when the Vaadin facet is enabled. This is incorrect when Maven and m2e are in use. When working with a Maven project, the Vaadin eclipse plugin shouldn't mess with the project classpath; m2e is responsible for maintaining it.
By adding these entries, Vaadin creates the possibility that the classpath seen by Maven will differ from the classpath seen by Eclipse. If the Vaadin, gwt, etc, versions in the pom.xml differ from those the Vaadin eclipse plugin thinks are in use, exciting and fun breakage can happen, including warnings and compile errors in Eclipse that don't happen with a Maven build, etc.
When the project is a Maven project, the Vaadin plugin should check to see if Vaadin depdendencies are in the pom.xml and offer to add them if they are not, rather than messing with the project class path directly. If they are present in the pom.xml it should auto-set the "Vaadin version" in the facet to the version found in the pom.
It should *NOT* silently add vaadin dependencies to the pom.xml - not unless it's smart enough to check the effective POM for dependencies inherited from a parent pom or via dependencyManagement and transitive dependencies. Correct handling of this would be required to detect the vaadin version in a project reliably anyway. Trying to change the version should produce a warning if the version wasn't set directly in the version field of the dependency - ie if it was inherited from a parent, transitively acquired, from a dependencyManagement pom import, etc. Either that, or changing the version should just not be supported for Maven projects, telling the user to go change it in their pom.xml instead.