{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/422","repository_url":"https://api.github.com/repos/vaadin/eclipse-plugin","labels_url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/422/comments","events_url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/422/events","html_url":"https://github.com/vaadin/eclipse-plugin/issues/422","id":134550509,"number":422,"title":"Vaadin eclipse plugin Vaadin facet can duplicate vaadin servlet in web.xml","user":{"login":"makoivis","id":7498049,"avatar_url":"https://avatars.githubusercontent.com/u/7498049?v=3","gravatar_id":"","url":"https://api.github.com/users/makoivis","html_url":"https://github.com/makoivis","followers_url":"https://api.github.com/users/makoivis/followers","following_url":"https://api.github.com/users/makoivis/following{/other_user}","gists_url":"https://api.github.com/users/makoivis/gists{/gist_id}","starred_url":"https://api.github.com/users/makoivis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makoivis/subscriptions","organizations_url":"https://api.github.com/users/makoivis/orgs","repos_url":"https://api.github.com/users/makoivis/repos","events_url":"https://api.github.com/users/makoivis/events{/privacy}","received_events_url":"https://api.github.com/users/makoivis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-18T11:15:15Z","updated_at":"2016-02-18T11:15:42Z","closed_at":null,"body":"**Reported by ringerc on 5 Jun 2012 05:00 UTC**\nIf a Maven project that already contains a web.xml configured for Vaadin is imported into Eclipse with m2e, then the Vaadin facet is enabled in Project Facets, the Vaadin facet may mangle web.xml and introduce a duplicate copy of the Vaadin servlet.\r\n\r\nThis seems to happen if you click \"Further configuration available...\" for the Vaadin facet after enabling it. The assumption seems to be that if you click that option you want to *add* vaadin support to a project, not enable IDE support for Vaadin.\r\n\r\nThe UI needs to be reworked to make it clearer that you're asking Eclipse to modify the project. Furthermore, it needs some validation; if the application class already exists the dialog will be accepted without error then the \"Apply...\" phase will fail with:\r\n\r\n```\r\nFailed while installing Vaadin plugin for eclipse 1.0.\r\n\r\nReason:\r\nVaadin libraries installation failed\r\n\r\n[libraries installation failed\r\n  /project-name/src/main/java/com/example/project_name/Project_nameApplication.java already exists in target\r\n```\r\n\r\nWhat should happen is that the dialog should validate its parameters, showing an error beside the class name if it already exists and not accepting \"[OK](<<Detail]\r\nVaadin)\" until the name is changed or \"Create project template...\" is unchecked.\r\n\r\nThe dialog should detect an existing Vaadin configuration in web.xml and uncheck \"Create project template...\" by default. If \"Create project template\" is checked and existing configuration is found, the dialog should ask whether the existing Vaadin parameters in web.xml should be removed and warn that a broken web.xml may be produced if they aren't.\r\n\r\n\"Create project template...\" should be renamed to mean something. Maybe \"Add Vaadin support to project...\" ? It needs to be clear that it's actually modifying the project, not just the Eclipse configuration.\r\n\r\nAlternately, \"Create project template\" should be renamed to \"Create / modify Vaadin configuration in project\" or something like that, and should be pre-filled with existing details from web.xml if found. If changed, a refactoring should be triggered. This is more work, of course.\r\n\r\nThe dialog is also notably missing a Cancel button, though escape works.\r\n\r\nAll in all, it needs some usability and design love.\r\n\n\nMigrated-From: http://my.domain/trac/env/ticket/8901"},"comment":{"url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/comments/185665170","html_url":"https://github.com/vaadin/eclipse-plugin/issues/422#issuecomment-185665170","issue_url":"https://api.github.com/repos/vaadin/eclipse-plugin/issues/422","id":185665170,"user":{"login":"makoivis","id":7498049,"avatar_url":"https://avatars.githubusercontent.com/u/7498049?v=3","gravatar_id":"","url":"https://api.github.com/users/makoivis","html_url":"https://github.com/makoivis","followers_url":"https://api.github.com/users/makoivis/followers","following_url":"https://api.github.com/users/makoivis/following{/other_user}","gists_url":"https://api.github.com/users/makoivis/gists{/gist_id}","starred_url":"https://api.github.com/users/makoivis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makoivis/subscriptions","organizations_url":"https://api.github.com/users/makoivis/orgs","repos_url":"https://api.github.com/users/makoivis/repos","events_url":"https://api.github.com/users/makoivis/events{/privacy}","received_events_url":"https://api.github.com/users/makoivis/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T11:15:42Z","updated_at":"2016-02-18T11:15:42Z","body":"**Modified by Artur Signell on 12 May 2014 07:42 UTC**"}}