|Re: Extracting information of remote repository [message #1385506 is a reply to message #1384896]
||Sat, 07 June 2014 20:54
| Robin Rosenberg
Registered: July 2009
Dol Bik skrev 2014-06-02 22.57:|
> I'm trying to extract some information like name, size, last modified, etc. from remote repositories using JGit.
> Let's take a random GitHub repository. There would be something like build, src, test etc. with some description and the last modified date.
> How can I get these information with JGit?
> I'm not sure if I have to clone, to build or to do something else with the repository.
Yes, you need to clone the repo in order to get at the kind of information you want.
> I'm using JGit for Eclipse, do I also need EGit?
> I've found some old tutorials, but they don't work with the newest version of JGit (for example the imports are incorrect).
org.spearce was renamed to org.eclipse, that might solve some problems. That was almost five years ago, so those tutorials
are pretty old and there are much better APIs nowadays. You should try to stick with the org.eclipse.jgit.api package as
much as possible.
> Could anybody please provide me with a working code snippet?
We don't have much tutorials on JGit, except what's been written by third parties, but there's a lot of code in the
form of unit tests, the pgm package and of course EGit.
Powered by FUDForum
. Page generated in 0.02164 seconds