Repository navigation
Remove the unused m2e nature and builder from all projects - #4605
Conversation
Most projects in this repository carry the m2e Maven nature and builder, although none of them is a Maven project: the build is pomless Tycho, no project has a pom.xml and no classpath uses the Maven container. In a workspace with m2e, every build therefore also runs the Maven builder on these projects for no benefit, which only costs build time. The nature and builder were never intended. They came in with 6af7769 together with a resource filter of the VS Code Java language server, so apparently through an IDE import, after Bug 539276 had already removed them from one project as unwanted. The projects from eclipse.platform.text and those added since never had them. The nature, the builder and the m2e preference files are removed, so all projects are plain PDE projects, as in the other platform repositories. eclipse-platform#4603 (comment) Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks! I've stumbled over that many times but never got the time to cleanup this. |
vogella
left a comment
There was a problem hiding this comment.
LGTM, thanks for this work @HeikoKlare looks like they came in during repo merge work
From memory then I did my Builder trace implementation in eclipse-platform/eclipse.platform#2802, I think the settings in the projects folder were the worst for performance. I just checked locally in test and see them also and I think this PR does not remove them.
vogella@Angelus:~/git/eclipse.platform.ui$ more .project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>eclipse.platform.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Removing the m2e nature changes the build qualifier of all touched projects, so those still at their 4.42 release version need a service version increment. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
|
I only see agreement and no objections so far, so I plan to merge this by the end of today. |
Without having checked the details and without saying that it applies here, but the m2e nature and builder can be relevant even for pure PDE projects that are build pomless by Tycho if e.g. the parent pom is configured in a way that Maven performs some parts of the build even in the workspace. For example to copy some resources or generate some files from a specific source or alike. |
While this is correct in theory, in practice nothing here benefits from M2E so it's just useless work for the IDE, unused configuration and warnings(some of us still get plain SDK for quick pristine check on smth) and etc. We shouldn't keep such based on theoretical "it might be needed". |
The m2e Maven nature and builder are configured for most projects in this repository, although none of them is a Maven project: the build is pomless Tycho, no project has a
pom.xmland no classpath uses the Maven container. As discussed in #4603 (comment), the nature was never required, and every unnecessary builder adds to the workspace build time. It came in with 6af7769 together with a resource filter of the VS Code Java language server, so apparently through an IDE import, while Bug 539276 had already removed it from one project before. The projects from eclipse.platform.text and those added since never had it.This change removes the nature, the builder and the m2e preference files from all projects, so they are plain PDE projects as in the other platform repositories.
How to test (unverified): import the projects into an Eclipse workspace with m2e installed. They build as PDE projects without new problems, and m2e no longer treats them as Maven projects. If m2e markers from an earlier import remain, delete them in the Problems view.