Bug 580403 - Importing MAT source into Eclipse 2022-06 creates various untracked files in git
Summary: Importing MAT source into Eclipse 2022-06 creates various untracked files in git
Status: CLOSED MOVED
Alias: None
Product: MAT
Classification: Tools
Component: Core (show other bugs)
Version: 1.13   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-19 12:31 EDT by Kevin Grigorenko CLA
Modified: 2024-05-08 16:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Grigorenko CLA 2022-07-19 12:31:02 EDT
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   features/org.eclipse.mat.chart.feature/.project
	modified:   features/org.eclipse.mat.feature/.project
	modified:   features/org.eclipse.mat.ui.rcp.feature/.project
	modified:   org.eclipse.mat.product/.project
	modified:   org.eclipse.mat.targetdef/.project
	modified:   org.eclipse.mat.updatesite/.project
	modified:   parent/.project
	modified:   plugins/org.eclipse.mat.api/.classpath
	modified:   plugins/org.eclipse.mat.api/.project
	modified:   plugins/org.eclipse.mat.chart.ui/.classpath
	modified:   plugins/org.eclipse.mat.chart.ui/.project
	modified:   plugins/org.eclipse.mat.chart.ui/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.chart/.classpath
	modified:   plugins/org.eclipse.mat.chart/.project
	modified:   plugins/org.eclipse.mat.chart/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.dtfj/.classpath
	modified:   plugins/org.eclipse.mat.dtfj/.project
	modified:   plugins/org.eclipse.mat.dtfj/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.hprof/.classpath
	modified:   plugins/org.eclipse.mat.hprof/.project
	modified:   plugins/org.eclipse.mat.hprof/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.ibmdumps/.classpath
	modified:   plugins/org.eclipse.mat.ibmdumps/.project
	modified:   plugins/org.eclipse.mat.ibmdumps/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.jdt/.classpath
	modified:   plugins/org.eclipse.mat.jdt/.project
	modified:   plugins/org.eclipse.mat.jdt/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.jruby.resolver/.classpath
	modified:   plugins/org.eclipse.mat.jruby.resolver/.project
	modified:   plugins/org.eclipse.mat.jruby.resolver/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.parser/.classpath
	modified:   plugins/org.eclipse.mat.parser/.project
	modified:   plugins/org.eclipse.mat.parser/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.report/.classpath
	modified:   plugins/org.eclipse.mat.report/.project
	modified:   plugins/org.eclipse.mat.report/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.tests/.classpath
	modified:   plugins/org.eclipse.mat.tests/.project
	modified:   plugins/org.eclipse.mat.tests/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.ui.help/.classpath
	modified:   plugins/org.eclipse.mat.ui.help/.project
	modified:   plugins/org.eclipse.mat.ui.help/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.ui.rcp.tests/.classpath
	modified:   plugins/org.eclipse.mat.ui.rcp.tests/.project
	modified:   plugins/org.eclipse.mat.ui.rcp.tests/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.ui.rcp/.classpath
	modified:   plugins/org.eclipse.mat.ui.rcp/.project
	modified:   plugins/org.eclipse.mat.ui.rcp/.settings/org.eclipse.jdt.core.prefs
	modified:   plugins/org.eclipse.mat.ui/.classpath
	modified:   plugins/org.eclipse.mat.ui/.project

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	features/org.eclipse.mat.chart.feature/.settings/
	features/org.eclipse.mat.feature/.settings/
	features/org.eclipse.mat.ui.rcp.feature/.settings/
	org.eclipse.mat.product/.settings/org.eclipse.m2e.core.prefs
	org.eclipse.mat.targetdef/.settings/
	org.eclipse.mat.updatesite/.settings/
	parent/.settings/
	plugins/org.eclipse.mat.api/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.chart.ui/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.chart/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.dtfj/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.hprof/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.ibmdumps/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.jdt/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.jruby.resolver/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.parser/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.report/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.tests/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.ui.help/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.ui.rcp.tests/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.ui.rcp/.settings/org.eclipse.m2e.core.prefs
	plugins/org.eclipse.mat.ui/.settings/org.eclipse.m2e.core.prefs
Comment 1 Eclipse Genie CLA 2022-07-19 12:52:14 EDT
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/194793
Comment 2 Andrew Johnson CLA 2022-07-24 06:17:18 EDT
Updating for Java 11 makes sense. It may force a minor version change,
but going to 1.14.0 is fine rather than 1.13.1

A question about .classpath is whether the change from output from /bin to /target/classes affects Eclipse builds or PDE builds. Where do the classes from a normal Eclipse build go after the change? Does exporting a plugin from Eclipse still work properly? Does build.properties need to be changed?

Do the org.eclipse.m2e.core.prefs files do much? Do we need them in the source,
or do we just git ignore them and let the build recreate them each time.
Perhaps adding them to the source is easiest.
Comment 3 Kevin Grigorenko CLA 2022-07-25 10:54:01 EDT
> Updating for Java 11 makes sense. It may force a minor version change,
> but going to 1.14.0 is fine rather than 1.13.1

Should I go ahead and update to 1.14.0 in this bug? This would also resolve bug 580402

> A question about .classpath is whether the change from output from /bin to
> /target/classes affects Eclipse builds or PDE builds.

I'm guessing that when I imported in Eclipse using Import } Maven } Existing Maven Projects rather than Import } General } Existing Projects into Workspace, that Eclipse decided to change from /bin to /target/classes. I'm not sure what the pros and cons are.

I've just tested doing a command line build, then opening Eclipse and then I'm able to successfully launch from within Eclipse, so it seems to work okay.

> Where do the classes from a normal Eclipse build go after the change?

I'm not sure if I understand the question, but I just did an Eclipse build, and the classes went into target/classes (instead of bin)

> Does exporting a plugin from Eclipse still work properly?

I've never done this before. Is this under Export } Plug-in Development } Deployable plug-ins and fragments?

> Does build.properties need to be changed?

Good point. Within Eclipse, it gives a warning in build.properties for the output field.

Should I just do a normal project import instead of a Maven project import, or should we continue down this path and modify build.properties as well?

> Do the org.eclipse.m2e.core.prefs files do much? Do we need them in the
> source, or do we just git ignore them and let the build recreate them
> each time. Perhaps adding them to the source is easiest.

I'm not sure what the best practice is. A quick search suggests it is valid to add these files to git in case we ever want to customize them: https://www.eclipse.org/lists/m2e-users/msg02756.html

"Profiles activated in m2e are stored under .settings/org.eclipse.m2e.core.prefs so you might want to add that file to your SCM."
Comment 4 Eclipse Webmaster CLA 2024-05-08 16:56:14 EDT
This issue has been migrated to https://github.com/eclipse-mat/org.eclipse.mat/issues/37.