gitective - mongo

gitective JGit MongoDB connector

Лицензия

Лицензия

Группа

Группа

org.gitective
Идентификатор

Идентификатор

gitective-mongo
Последняя версия

Последняя версия

0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

gitective - mongo
gitective JGit MongoDB connector
Система контроля версий

Система контроля версий

https://github.com/kevinsawicki/jgit-mongo

Скачать gitective-mongo

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.gitective/gitective-mongo/ -->
<dependency>
    <groupId>org.gitective</groupId>
    <artifactId>gitective-mongo</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.gitective/gitective-mongo/
implementation 'org.gitective:gitective-mongo:0.1'
// https://jarcasting.com/artifacts/org.gitective/gitective-mongo/
implementation ("org.gitective:gitective-mongo:0.1")
'org.gitective:gitective-mongo:jar:0.1'
<dependency org="org.gitective" name="gitective-mongo" rev="0.1">
  <artifact name="gitective-mongo" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.gitective', module='gitective-mongo', version='0.1')
)
libraryDependencies += "org.gitective" % "gitective-mongo" % "0.1"
[org.gitective/gitective-mongo "0.1"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.mongodb : mongo-java-driver jar 2.7.3
org.eclipse.jgit : org.eclipse.jgit jar 1.3.0.201202151440-r
org.eclipse.jgit : org.eclipse.jgit.storage.dht jar 1.3.0.201202151440-r

Модули Проекта

Данный проект не имеет модулей.

JGit MongoDB connector

This project is a JGit DHT implementation using MongoDB as the backing database that uses the Mongo Java Driver library for connecting to MongoDB.

Example

The code snippet below shows how to fetch the linux-2.6 Git repository into MongoDB using a JGit repository.

Repository repo = MongoDatabase.open("linux-26");
repo.create(true);
StoredConfig config = repo.getConfig();
RemoteConfig remoteConfig = new RemoteConfig(config, "origin");
URIish uri = new URIish("git://github.com/mirrors/linux-2.6.git");
remoteConfig.addURI(uri);
remoteConfig.update(config);
config.save();
RefSpec spec = new RefSpec("refs/heads/*:refs/remotes/origin/*");
Git.wrap(repo).fetch().setRemote("origin").setRefSpecs(spec).call();

You could the walk the commits imported into MongoDB using the following:

Repository repo = MongoDatabase.open("linux-26");
RevWalk walk = new RevWalk(repo);
walk.markStart(walk.parseCommit(repo.resolve("origin/master")));
for (RevCommit commit : walk)
    System.out.println(commit.getShortMessage());

Building from source

The JGit-MongoDB connector can be built using Maven. The pom.xml to build the core plug-in is located at the root of the org.gitective.mongo folder.

cd jgit-mongo/org.gitective.mongo
mvn clean install

Dependencies

  • JGit
  • MongoDB Java Driver

License

MIT License

Версии библиотеки

Версия
0.1