Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2011-05-13 14:44:42 +0000
committerChris Aniszczyk2011-05-25 14:00:42 +0000
commit6ec6169215eb33683728c583e231eb5fe9617813 (patch)
tree3b06bb912d42705490e8e1ae3856f71f7f7be1e3 /pom.xml
parent7cad0adc7dd0f1ce261a11b16bd1725a12827161 (diff)
downloadjgit-6ec6169215eb33683728c583e231eb5fe9617813.tar.gz
jgit-6ec6169215eb33683728c583e231eb5fe9617813.tar.xz
jgit-6ec6169215eb33683728c583e231eb5fe9617813.zip
DHT: Replace TinyProtobuf with Google Protocol Buffers
The standard Google distribution of Protocol Buffers in Java is better maintained than TinyProtobuf, and should be faster for most uses. It does use slightly more memory due to many of our key types being stored as strings in protobuf messages, but this is probably worth the small hit to memory in exchange for better maintained code that is easier to reuse in other applications. Exposing all of our data members to the underlying implementation makes it easier to develop reporting and data mining tools, or to expand out a nested structure like RefData into a flat format in a SQL database table. Since the C++ `protoc` tool is necessary to convert the protobuf script into Java code, the generated files are committed as part of the source repository to make it easier for developers who do not have this tool installed to still build the overall JGit package and make use of it. Reviewers will need to be careful to ensure that any edits made to a *.proto file come in a commit that also updates the generated code to match. CQ: 5135 Change-Id: I53e11e82c186b9cf0d7b368e0276519e6a0b2893 Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 76c0dbe4ac..7717c66e74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,6 +135,7 @@
<args4j-version>2.0.12</args4j-version>
<servlet-api-version>2.5</servlet-api-version>
<jetty-version>7.1.6.v20100715</jetty-version>
+ <protobuf-version>2.4.0a</protobuf-version>
</properties>
<build>
@@ -348,6 +349,12 @@
<artifactId>jetty-servlet</artifactId>
<version>${jetty-version}</version>
</dependency>
+
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuf-version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -392,6 +399,7 @@
<modules>
<module>org.eclipse.jgit</module>
+ <module>org.eclipse.jgit.generated.storage.dht.proto</module>
<module>org.eclipse.jgit.storage.dht</module>
<module>org.eclipse.jgit.ant</module>
<module>org.eclipse.jgit.ui</module>

Back to the top