You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Support LFS protocol and a file system based LFS storage Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
8 years ago
Support LFS protocol and a file system based LFS storage Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
8 years ago
Support LFS protocol and a file system based LFS storage Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2015, Matthias Sohn <matthias.sohn@sap.com>
  4. and other copyright owners as documented in the project's IP log.
  5. This program and the accompanying materials are made available
  6. under the terms of the Eclipse Distribution License v1.0 which
  7. accompanies this distribution, is reproduced below, and is
  8. available at http://www.eclipse.org/org/documents/edl-v10.php
  9. All rights reserved.
  10. Redistribution and use in source and binary forms, with or
  11. without modification, are permitted provided that the following
  12. conditions are met:
  13. - Redistributions of source code must retain the above copyright
  14. notice, this list of conditions and the following disclaimer.
  15. - Redistributions in binary form must reproduce the above
  16. copyright notice, this list of conditions and the following
  17. disclaimer in the documentation and/or other materials provided
  18. with the distribution.
  19. - Neither the name of the Eclipse Foundation, Inc. nor the
  20. names of its contributors may be used to endorse or promote
  21. products derived from this software without specific prior
  22. written permission.
  23. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  24. CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  25. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  26. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  28. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  30. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  31. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  32. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  33. STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  34. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  35. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. -->
  37. <project xmlns="http://maven.apache.org/POM/4.0.0"
  38. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  39. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  40. <modelVersion>4.0.0</modelVersion>
  41. <parent>
  42. <groupId>org.eclipse.jgit</groupId>
  43. <artifactId>org.eclipse.jgit-parent</artifactId>
  44. <version>4.11.10-SNAPSHOT</version>
  45. </parent>
  46. <artifactId>org.eclipse.jgit.lfs.server</artifactId>
  47. <name>JGit - Large File Storage Server</name>
  48. <description>
  49. JGit Large File Storage Server implementation.
  50. </description>
  51. <properties>
  52. <translate-qualifier/>
  53. </properties>
  54. <dependencies>
  55. <dependency>
  56. <groupId>org.eclipse.jgit</groupId>
  57. <artifactId>org.eclipse.jgit</artifactId>
  58. <version>${project.version}</version>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.eclipse.jgit</groupId>
  62. <artifactId>org.eclipse.jgit.lfs</artifactId>
  63. <version>${project.version}</version>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.eclipse.jgit</groupId>
  67. <artifactId>org.eclipse.jgit.http.apache</artifactId>
  68. <version>${project.version}</version>
  69. </dependency>
  70. <dependency>
  71. <groupId>javax.servlet</groupId>
  72. <artifactId>javax.servlet-api</artifactId>
  73. <scope>provided</scope>
  74. </dependency>
  75. <dependency>
  76. <groupId>com.google.code.gson</groupId>
  77. <artifactId>gson</artifactId>
  78. </dependency>
  79. </dependencies>
  80. <build>
  81. <sourceDirectory>src/</sourceDirectory>
  82. <resources>
  83. <resource>
  84. <directory>.</directory>
  85. <includes>
  86. <include>plugin.properties</include>
  87. <include>about.html</include>
  88. </includes>
  89. </resource>
  90. <resource>
  91. <directory>resources/</directory>
  92. </resource>
  93. </resources>
  94. <plugins>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-source-plugin</artifactId>
  98. <inherited>true</inherited>
  99. <executions>
  100. <execution>
  101. <id>attach-sources</id>
  102. <phase>process-classes</phase>
  103. <goals>
  104. <goal>jar</goal>
  105. </goals>
  106. <configuration>
  107. <archive>
  108. <manifestFile>${source-bundle-manifest}</manifestFile>
  109. </archive>
  110. </configuration>
  111. </execution>
  112. </executions>
  113. </plugin>
  114. <plugin>
  115. <artifactId>maven-jar-plugin</artifactId>
  116. <configuration>
  117. <archive>
  118. <manifestFile>${bundle-manifest}</manifestFile>
  119. </archive>
  120. </configuration>
  121. </plugin>
  122. </plugins>
  123. </build>
  124. </project>