Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Failure while creating project by using GIT
Failure while creating project by using GIT [message #1794875] Mon, 10 September 2018 07:44 Go to next message
column column is currently offline column columnFriend
Messages: 17
Registered: December 2017
Junior Member
I have Eclipse Java project on windows machine. I have pushed this project to newly created project in `Bitbucket` repository.
Now I would like to get this project in another machine by using Eclipse with `eGit` plugin. I do

Import->Source git repository->BranchSelection->Local destination->Select wizard to use for importing objects->Import using New Project wizzard->Select wizard (java project)-> Create Java project

Got error:
https://i.stack.imgur.com/icnjr.png




If I do `Import as general project` instead of `Import using New Project wizard` I'm getting Generic project with files from Git. But it is not Java project.

I suppose there is less complicated way of creating Eclipse Java Git project. What is the right way of doing that?


UPD

I was trying to checkout project from GIT bash and then import into eclipse by doing:
File -> Import -> Projects from GIT -> Existing local repository -> Import using New project wizard -> Java project - > Java project

Got the same CoreException

Log file attached.

  • Attachment: egit.log
    (Size: 211.78KB, Downloaded 8 times)
Re: Failure while creating project by using GIT [message #1794876 is a reply to message #1794875] Mon, 10 September 2018 07:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

I see many disturbing entries in the log that really should be addressed e.g. Cp1252.

But project-but-not-java-project has an obvious answer; you have omitted the ".project" file from your GIT repo that defines your project as a Java project.

Regards

Ed Willink
Re: Failure while creating project by using GIT [message #1794879 is a reply to message #1794876] Mon, 10 September 2018 08:51 Go to previous messageGo to next message
column column is currently offline column columnFriend
Messages: 17
Registered: December 2017
Junior Member
I'm wondering that I should commit .project file to git. I suppose new java project wizard should create it's own .project.

I did commit .project, but got the same error. Please find log file attached.
  • Attachment: egit2.log
    (Size: 214.25KB, Downloaded 4 times)
Re: Failure while creating project by using GIT [message #1794883 is a reply to message #1794879] Mon, 10 September 2018 09:27 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6040
Registered: July 2009
Senior Member
Hi

I see nothing relevant in the log file.

The ".*" files in your project contain important information. If you do not commit them to GIT then any re-user will not use the original files, but must recreate them. This can be a tedious manual or a fragile automated activity; I see that EGIT has a deduce project natures option. I have never used it and do not plan to, since I cannot see how I could implement it accurately. It is perhaps a better than nothing option for those users who have been deprived of the full project content. It seems to be a major disservice to your users to even offer an opportunity to get it so wrong. (Why bother putting Java files in GIT; your users can surely rewrite them too?)

Put ".project", ".classpath", ".gitignore", ".options", ".checkstyle", ".settings/..." etc in GIT.

Regards

Ed Willink
Previous Topic:JVM.dll ignores -Xss argument
Next Topic:Right way of working with GIT
Goto Forum:
  


Current Time: Sun Sep 23 12:20:04 GMT 2018

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top