开发者

Eclipse + Maven Plugin + EGit Plugin = Checkout from GitHub a specific Branche and Tag?

开发者 https://www.devze.com 2023-03-06 02:52 出处:网络
I know this is a relatively special question. Maybe some knows this nevertheless: I want to compile Hector with Maven in Eclipse=> Branch: 0.7.0 and Tag: hector-0.7.0-29

I know this is a relatively special question. Maybe some knows this nevertheless:

I want to compile Hector with Maven in Eclipse=> Branch: 0.7.0 and Tag: hector-0.7.0-29 (https://github.com/rantav/hector.git). (The mentionaed Branch/Tag are not(!) the Master Branch, so requires a dedicated Checkout.)

I have installed: Maven-Maven Plugin and the EGit Plugin for Eclipse

My Problem:

1.)Maven Plugin allows to checkout directoly from a SCM like GitHub (when installing the maven-git-plugin= this is not the same as egit plugin). I am now able to downlaod a Project directly from Github with the maven plugin. On Disk I find the Tag and Branch (as Git files in the .git Directory.)

But the Problem is, the Version that is checkout out is the MASTER Branch. And I do not find an option to checkout the specific Branch and Tag directly within Eclipse. When clicking on "Team-Context-Menu" I normally have all the EGit Options (to checkout a specific Branch/Tag). But due to the fact the Project got downladed via the Maven Plugin it seems it is not regarded from Eclipse as an Git Repository.) So klicking on "Team" where I normally have all my Git-Commoands is more or less empty. I need to find a way to tell Eclipse that this Project is a GIT/EGIT managable project, so that I have the menu options to manage it.

2.) Furthermore I want the downloaded Project to be completely "SCM-Managed" (via Git) so that I can "track" my local changes 开发者_如何学JAVAto the files. Therefore all "Egit Context Menu" Stuff should be working for this checked out project.

If someone knows how to do this, I would be very kind for any advice!

Thank you very much! Jens


Well, the simpler answer would just be to clone the repository with EGit, right click on the repository in the repositories view and select "Import Projects".


I had a similar problem with a repository already cloned, but new projects were on a new branch. I switched to the desired branch and used "Team" -> "Show in Repositories View" -> "Working Directory" -> "Import Maven Projects..." on the desired projects.

0

精彩评论

暂无评论...
验证码 换一张
取 消