Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep custom project facets when refreshing a project that applies eclipse-wtp plugin #544

Open
mauromol opened this issue Aug 7, 2017 · 2 comments

Comments

@mauromol
Copy link

mauromol commented Aug 7, 2017

This is somewhat a follow up to #392.
The same logic to "keep what you don't manage" should be applied to Eclipse WTP project facets (in the component file) that are not among the ones handled to configure java and war projects.

As a concrete example, I have some WTP projects that use the JPA facet or the JavaScript facet and whenever I refresh my Gradle project with Buildship 2.1.1, those facets are removed.

Yes, once again I may tweak the build script to re-add those facets, but I think they should not be managed by Buildship, since they are related to IDE tooling configuration and not to project building/deploying/running.

@mauromol
Copy link
Author

mauromol commented Aug 7, 2017

I just made some tests and I think that the current behaviour is the consequence of calling the cleanEclipseWtpFacet task before the eclipseWtpFacet task, as described here to solve a previous bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=506627#c1

In fact, if I manually invoke the eclipseWtpFacet task from the command line, Gradle by itself does not remove my other facets (like JPA or JavaScript).

@oehme
Copy link
Member

oehme commented Aug 7, 2017

We'd need some deeper integration with WTP to solve this properly. The way I imagine this working would be to only remove old facets that were actually added by Gradle, similar to what we do with Natures and Builders. For that to work, we'll need to model WTP more strongly instead of just calling the task.

Calling the task was always just a workaround, though one that works pretty well for the 80% case. Let's prioritize this along other popular feature requests after #354 and #211 are done.

@donat donat changed the title Keep custom project factets when refreshing a project that applies eclipse-wtp plugin Keep custom project facets when refreshing a project that applies eclipse-wtp plugin Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants