Reputation: 21
I have a maven project in Github and I want to work with that in Eclipse. In eclipse, there is an option for File>New>Other>Maven>Check out Maven Projects from SCM. But the dropdown select option near SCM URL is inactive. On clicking "m2e Marketplace", I cannot find git in the list. Though I did find egit, so I tried to install it. But I got the below error message.
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.egit,3.4.1.201406201815-r
No repository found containing: osgi.bundle,org.eclipse.egit.core,3.4.1.201406201815-r
No repository found containing: osgi.bundle,org.eclipse.egit.doc,3.4.1.201406201815-r
No repository found containing: osgi.bundle,org.eclipse.egit.ui,3.4.1.201406201815-r
No repository found containing: osgi.bundle,org.eclipse.jgit,3.4.1.201406201815-r
No repository found containing: osgi.bundle,org.eclipse.jgit.archive,3.4.1.201406201815-r
No repository found containing: org.eclipse.update.feature,org.eclipse.egit,3.4.1.201406201815-r
No repository found containing: org.eclipse.update.feature,org.eclipse.jgit,3.4.1.201406201815-r
What went wrong? Can I use egit instead of Git? Why did I get the error message? Sorry to diviate, is "m4e" the next generation of "m2e"?
Upvotes: 2
Views: 589
Reputation: 256
Which version of Eclipse did you use ?
I guess you use Java packaging or Java EE packaging. By default Egit is already present in these two packages.
If you want to use the option "Check out Maven Projects from SCM", you need to install m2e connector. You can do this with : Windows > Preferences > Maven > Discovery > Open Catalog. And install m2e-egit. The main problem is that m2e-egit is not always up to date. It can be impossible to install it in your Eclipse.
Personnally, I don't use this functionnality. I prefer checkout my sources through Egit and after I import my maven project.
To checkout sources - Open Git perspective - Clone your Github repository (see tutorial made by Lars Vogel http://www.vogella.com/tutorials/EclipseGit/article.html)
** To import maven project ** - Go to File > Import > Existing Maven Project - Select the folder where there is your Git repository - Follow the wizard
Your project will be imported in Eclipse.
Upvotes: 1