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

How to avoid .project changes by m2e (needed for PDE Maven integration) #1785

Open
vogella opened this issue Jul 5, 2024 · 10 comments
Open

Comments

@vogella
Copy link
Contributor

vogella commented Jul 5, 2024

If I open eclipse.platform projects frequently the .project files are getting modified, similar to the following:

<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
		<nature>org.eclipse.pde.PluginNature</nature>
		<nature>org.eclipse.jdt.core.javanature</nature>
	</natures>
	<filteredResources>
		<filter>
			<id>1720167607154</id>
			<name></name>
			<type>30</type>
			<matcher>
				<id>org.eclipse.core.resources.regexFilterMatcher</id>
				<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
			</matcher>
		</filter>
	</filteredResources>

I typically reset these changes, assuming we do not want these in platform. But as this happens frequently I wonder how others like @laeubi or @HannesWell handle these? Add .project to .gitignore? Or is there a setting to avoid this?

@vogella
Copy link
Contributor Author

vogella commented Jul 5, 2024

Plus I get org.eclipse.m2.core.prefs generated with the following content:

activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

@vogella
Copy link
Contributor Author

vogella commented Jul 10, 2024

Example for my PDE workspace:

image

@laeubi
Copy link
Member

laeubi commented Jul 10, 2024

I'm not sure hwo you setup exactly the workspace but this does not happen with the official SDK setup and should only happen if you explicitly enable m2e nature for a project.

@vogella
Copy link
Contributor Author

vogella commented Jul 10, 2024

I'm not sure hwo you setup exactly the workspace but this does not happen with the official SDK setup and should only happen if you explicitly enable m2e nature for a project.

Thank is very good to hear.

My regular process is:

  • Download SDK
  • Install Git from simrel side
  • Install M2E / PDE integration from simrel side
  • Clone and import projects

So I would guess nothing special. I can test the next time these annoying file pop up.

I have also seen the generation of these files with clients. I assume most platform developer except you and @HannesWell do not have the M2E / PDE extension installed as he SDK development is not using target platform with Maven dependencies (or any target platform as far as I know, IMHO one of the reasons why the target editor was super slow and buggy for a long time) or use the Oomph setup which may also do a different setup / installation.

@laeubi
Copy link
Member

laeubi commented Jul 10, 2024

The setup is described here and that contains m2e and of course the pde extension, if people are using something else that's possible but not necessarily supported so one probably seeing different results.

@vogella
Copy link
Contributor Author

vogella commented Jul 10, 2024

The setup is described here and that contains m2e and of course the pde extension, if people are using something else that's possible but not necessarily supported so one probably seeing different results.

The issue is also present for non-platform projects so I think it is good to find what is causing this.

@fbricon
Copy link
Contributor

fbricon commented Jul 10, 2024

the filter is created by jdt.ls, which means either you opened your code in VS Code, or with some Eclipse/JDT.LS client plugin

@laeubi
Copy link
Member

laeubi commented Jul 10, 2024

The issue is also present for non-platform projects so I think it is good to find what is causing this.

As said I never have seen such issue with any Eclipse I can officially download nor with the official platform setup, so I don't see what m2e (that is an Eclipse Plugin) can do here.

@vogella
Copy link
Contributor Author

vogella commented Jul 10, 2024

The issue is also present for non-platform projects so I think it is good to find what is causing this.

As said I never have seen such issue with any Eclipse I can officially download nor with the official platform setup, so I don't see what m2e (that is an Eclipse Plugin) can do here.

Like I said, once I see this again, I will try to create a reproducable example with official downloads.

@vogella
Copy link
Contributor Author

vogella commented Jul 10, 2024

the filter is created by jdt.ls, which means either you opened your code in VS Code, or with some Eclipse/JDT.LS client plugin

Thanks, that is interesting I keep that in mind during my attempt to re-create. Should jdt.ls also respect the m2e nature setting or does it consider other setting files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants