Project imported from git on 2020-12 doesn't know it's a java project [message #1836048] |
Fri, 18 December 2020 23:16 |
David M. Karr Messages: 801 Registered: July 2009 |
Senior Member |
|
|
I've been working on projects using git, Java, SpringBoot, and Maven for quite a while now. These projects were working fine in 2020-09, along with the Groovy and Spring plugins. I had imported the projects from git, and it recognized the projects as maven and java projects.
I just installed 2020-12. I exported my preferences from the 2020-09 workspace and imported them into my 2020-12 workspace. I had all the same plugins installed.
When I imported those same projects into this new workspace, I initially noticed that I was getting "Plugin execution not covered by lifecycle configuration" errors (detailed at https://stackoverflow.com/questions/65349325/eclipse-2020-12-m2e-is-reporting-plugin-execution-not-covered-although-2020-09 ). I thought for a while this was a "missing connector" issue, but it's not suggesting any connectors.
Then I noticed that the underlying problem may be that when Eclipse imports the project, it's not detecting that it's a Java project. It IS detecting that it is a Maven project, just not Java.
I compared the ".project" file I get after import with the .project file I have for the same git repository imported into my 2020-09 workspace. The project in my 2020-09 workspace has the "maven2Builder", but it also has the "javabuilder" and the "springbootbuilder". In my 2020-12 project, it only has the "maven2Builder". There is a similar disparity in the "natures" list.
I then tried simply copying the .project and .classpath files from the local repository that I used to import into my 2020-09 workspace and copied them into the local repository I used to import into the 2020-12 workspace. That fixed the project. Note that the two local repositories are clones of the same remote workspace, but I cloned them separately to ensure that any local changes only affected a specific project.
In the past, I believe I've seen occurrences of the project import not detecting that the project was a Maven project. My workaround was doing exactly what I did here, copying the correct .project and .classpath files from an existing working import. In this case, instead of failing to detect the Maven nature, it failed to detect the Java and SpringBoot natures.
I suppose there may be some magic here that I'm expecting that may not actually be present. If it can't magically determine it's a Java project, what are the proper steps that I should be performing to tell it that it is. I would assume that directly editing the .project and .classpath files would NOT be the correct process.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03090 seconds