Gitiles is a simple browser for Git repositories It is based on JGit and uses Google Closure Templates as a templating language. Access to underlying repositories is based on a few simple interfaces; currently, there is only a simple disk-based implementation, but other implementations are possible. Features include viewing repositories by branch, shortlogs, showing individual files and diffs with syntax highlighting, with many more planned. The application itself is a standard Java servlet and is configured primarily via a git config format file. Deploying the WAR in any servlet container should be possible. In addition, a standalone server may be run with jetty-maven-plugin with `mvn package && mvn jetty:run`. Change-Id: I0ab8875b6c50f7df03b9a42b4a60923a4827bde7
diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..aedba11 --- /dev/null +++ b/pom.xml
@@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright 2012 Google Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.google.gitiles</groupId> + <artifactId>gitiles-parent</artifactId> + <packaging>pom</packaging> + <version>1.0-SNAPSHOT</version> + + <name>Gitiles - Parent</name> + <url>https://gerrit.googlesource.com/gitiles</url> + + <description> + Gitiles - Simple Git Repository Browser + </description> + + <properties> + <!-- Should track Gerrit's jgitVersion fairly closely. --> + <jgitVersion>2.0.0.201206130900-r.129-ge63f1c9</jgitVersion> + <jettyVersion>7.5.2.v20111006</jettyVersion> + </properties> + + <modules> + <module>gitiles-servlet</module> + <module>gitiles-war</module> + </modules> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>13.0</version> + </dependency> + + <dependency> + <groupId>com.google.template</groupId> + <artifactId>soy</artifactId> + <version>2011-22-12</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${jgitVersion}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.http.server</artifactId> + <version>${jgitVersion}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit</artifactId> + <version>${jgitVersion}</version> + <exclusions> + <exclusion> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>servlet-api</artifactId> + <version>6.0.29</version> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.6.1</version> + </dependency> + + <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + <version>2.1</version> + </dependency> + + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.1</version> + </dependency> + + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.1</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <version>${jettyVersion}</version> + </dependency> + </dependencies> + </dependencyManagement> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + <configuration> + <source>1.6</source> + <target>1.6</target> + <encoding>UTF-8</encoding> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestEntries> + <Implementation-Title>Gitiles - ${project.artifactId}</Implementation-Title> + <Implementation-Version>${project.version}</Implementation-Version> + <Implementation-Vendor>Gitiles</Implementation-Vendor> + <Implementation-Vendor-Id>com.google.gitiles</Implementation-Vendor-Id> + <Implementation-Vendor-URL>https://gerrit.googlesource.com/gitiles/</Implementation-Vendor-URL> + </manifestEntries> + </archive> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.1.1</version> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.2</version> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> + <version>${jettyVersion}</version> + <configuration> + <webApp> + <defaultsDescriptor>gitiles-war/webdefault.xml</defaultsDescriptor> + </webApp> + <war>gitiles-war/target/gitiles-war-${project.version}.war</war> + </configuration> + <!-- TODO(dborowitz): Separate execution with reloadable static + resources and templates. --> + </plugin> + </plugins> + </build> + + <repositories> + <!-- For JGit and Soy snapshots. --> + <repository> + <id>gerrit-maven</id> + <url>https://gerrit-maven.commondatastorage.googleapis.com</url> + </repository> + + <repository> + <id>jgit-repository</id> + <url>http://download.eclipse.org/jgit/maven</url> + </repository> + + <repository> + <id>java.net-repository</id> + <url>http://download.java.net/maven/2/</url> + </repository> + </repositories> +</project>