mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #5 from overleaf/file-not-in-the-current-commit
Try to download file if it's not in the git tree
This commit is contained in:
commit
0390f80aaa
53 changed files with 737 additions and 140 deletions
|
@ -17,7 +17,7 @@
|
|||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
<profile default="false" name="Maven default annotation processors profile" enabled="true">
|
||||
<profile default="false" name="Annotation profile for writelatex-git-bridge" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
|
@ -30,4 +30,3 @@
|
|||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: cglib:cglib-nodep:2.1_3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: ch.qos.logback:logback-classic:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: ch.qos.logback:logback-core:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.3/jackson-annotations-2.5.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.3/jackson-annotations-2.5.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.5.3/jackson-annotations-2.5.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.3/jackson-core-2.5.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.3/jackson-core-2.5.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.5.3/jackson-core-2.5.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.3/jackson-databind-2.5.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.3/jackson-databind-2.5.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.5.3/jackson-databind-2.5.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:btf:1.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/btf/1.2/btf-1.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/btf/1.2/btf-1.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/btf/1.2/btf-1.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:jackson-coreutils:1.8">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/jackson-coreutils/1.8/jackson-coreutils-1.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/jackson-coreutils/1.8/jackson-coreutils-1.8-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/jackson-coreutils/1.8/jackson-coreutils-1.8-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:json-schema-core:1.2.5">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-core/1.2.5/json-schema-core-1.2.5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-core/1.2.5/json-schema-core-1.2.5-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-core/1.2.5/json-schema-core-1.2.5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:json-schema-validator:2.2.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-validator/2.2.6/json-schema-validator-2.2.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-validator/2.2.6/json-schema-validator-2.2.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/json-schema-validator/2.2.6/json-schema-validator-2.2.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:msg-simple:1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/msg-simple/1.1/msg-simple-1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/msg-simple/1.1/msg-simple-1.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/msg-simple/1.1/msg-simple-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.github.fge:uri-template:0.9">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/uri-template/0.9/uri-template-0.9.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/uri-template/0.9/uri-template-0.9-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/fge/uri-template/0.9/uri-template-0.9-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.code.findbugs:jsr305:3.0.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.guava:guava:18.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/18.0/guava-18.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/18.0/guava-18.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/guava/guava/18.0/guava-18.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.googlecode.libphonenumber:libphonenumber:6.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/googlecode/libphonenumber/libphonenumber/6.2/libphonenumber-6.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/googlecode/libphonenumber/libphonenumber/6.2/libphonenumber-6.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/googlecode/libphonenumber/libphonenumber/6.2/libphonenumber-6.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.jcraft:jzlib:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/jcraft/jzlib/1.1.3/jzlib-1.1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/jcraft/jzlib/1.1.3/jzlib-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: commons-io:commons-io:1.3.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/1.3.2/commons-io-1.3.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/1.3.2/commons-io-1.3.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-buffer:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.0.31.Final/netty-buffer-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.0.31.Final/netty-buffer-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.0.31.Final/netty-buffer-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-codec:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.0.31.Final/netty-codec-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.0.31.Final/netty-codec-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.0.31.Final/netty-codec-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-codec-http:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-http/4.0.31.Final/netty-codec-http-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-http/4.0.31.Final/netty-codec-http-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-http/4.0.31.Final/netty-codec-http-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-codec-socks:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-socks/4.0.31.Final/netty-codec-socks-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-socks/4.0.31.Final/netty-codec-socks-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec-socks/4.0.31.Final/netty-codec-socks-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-common:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.0.31.Final/netty-common-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.0.31.Final/netty-common-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.0.31.Final/netty-common-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-handler:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.0.31.Final/netty-handler-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.0.31.Final/netty-handler-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.0.31.Final/netty-handler-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: io.netty:netty-transport:4.0.31.Final">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.0.31.Final/netty-transport-4.0.31.Final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.0.31.Final/netty-transport-4.0.31.Final-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.0.31.Final/netty-transport-4.0.31.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: janino:janino:2.5.10">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/janino/janino/2.5.10/janino-2.5.10.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/janino/janino/2.5.10/janino-2.5.10-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/janino/janino/2.5.10/janino-2.5.10-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: javax.activation:activation:1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: javax.mail:mailapi:1.4.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/mail/mailapi/1.4.3/mailapi-1.4.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/mail/mailapi/1.4.3/mailapi-1.4.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/mail/mailapi/1.4.3/mailapi-1.4.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: junit:junit:4.10">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.10/junit-4.10-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: junit:junit:4.12">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: net.sf.jopt-simple:jopt-simple:4.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.apache.commons:commons-lang3:3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.bouncycastle:bcmail-jdk15on:1.52">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcmail-jdk15on/1.52/bcmail-jdk15on-1.52.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcmail-jdk15on/1.52/bcmail-jdk15on-1.52-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcmail-jdk15on/1.52/bcmail-jdk15on-1.52-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.bouncycastle:bcpkix-jdk15on:1.52">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcpkix-jdk15on/1.52/bcpkix-jdk15on-1.52.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcpkix-jdk15on/1.52/bcpkix-jdk15on-1.52-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcpkix-jdk15on/1.52/bcpkix-jdk15on-1.52-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.bouncycastle:bcprov-jdk15on:1.52">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,13 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.hamcrest:hamcrest-core:1.1">
|
||||
<library name="Maven: org.hamcrest:hamcrest-core:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.jmock:jmock-legacy:2.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jmock/jmock-legacy/2.6.0/jmock-legacy-2.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jmock/jmock-legacy/2.6.0/jmock-legacy-2.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jmock/jmock-legacy/2.6.0/jmock-legacy-2.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.json:json:20090211">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.mock-server:mockserver-client-java:3.10.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-client-java/3.10.1/mockserver-client-java-3.10.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-client-java/3.10.1/mockserver-client-java-3.10.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-client-java/3.10.1/mockserver-client-java-3.10.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.mock-server:mockserver-core:3.10.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-core/3.10.1/mockserver-core-3.10.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-core/3.10.1/mockserver-core-3.10.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-core/3.10.1/mockserver-core-3.10.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.mock-server:mockserver-logging:3.10.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-logging/3.10.1/mockserver-logging-3.10.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-logging/3.10.1/mockserver-logging-3.10.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-logging/3.10.1/mockserver-logging-3.10.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.mock-server:mockserver-netty:3.10.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-netty/3.10.1/mockserver-netty-3.10.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-netty/3.10.1/mockserver-netty-3.10.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mock-server/mockserver-netty/3.10.1/mockserver-netty-3.10.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.mozilla:rhino:1.7R4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mozilla/rhino/1.7R4/rhino-1.7R4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/mozilla/rhino/1.7R4/rhino-1.7R4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.objenesis:objenesis:1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/1.0/objenesis-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/1.0/objenesis-1.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/objenesis/objenesis/1.0/objenesis-1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.skyscreamer:jsonassert:1.2.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.2.3/jsonassert-1.2.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.2.3/jsonassert-1.2.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/skyscreamer/jsonassert/1.2.3/jsonassert-1.2.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -49,18 +49,14 @@
|
|||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.10</version>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jmock</groupId>
|
||||
<artifactId>jmock-junit4</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jmock</groupId>
|
||||
<artifactId>jmock-legacy</artifactId>
|
||||
<version>2.6.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
|
@ -102,6 +98,12 @@
|
|||
<artifactId>joda-time</artifactId>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mock-server</groupId>
|
||||
<artifactId>mockserver-netty</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -10,6 +10,7 @@ import uk.ac.ic.wlgitbridge.data.filestore.GitDirectoryContents;
|
|||
import uk.ac.ic.wlgitbridge.data.filestore.RawDirectory;
|
||||
import uk.ac.ic.wlgitbridge.data.filestore.RawFile;
|
||||
import uk.ac.ic.wlgitbridge.data.model.db.PersistentStore;
|
||||
import uk.ac.ic.wlgitbridge.data.model.db.SqlitePersistentStore;
|
||||
import uk.ac.ic.wlgitbridge.snapshot.exception.FailedConnectionException;
|
||||
import uk.ac.ic.wlgitbridge.snapshot.getforversion.SnapshotAttachment;
|
||||
import uk.ac.ic.wlgitbridge.snapshot.push.exception.SnapshotPostException;
|
||||
|
@ -31,7 +32,7 @@ public class DataStore {
|
|||
|
||||
public DataStore(String rootGitDirectoryPath) {
|
||||
rootGitDirectory = initRootGitDirectory(rootGitDirectoryPath);
|
||||
persistentStore = new PersistentStore(rootGitDirectory);
|
||||
persistentStore = new SqlitePersistentStore(rootGitDirectory);
|
||||
List<String> excludedFromDeletion = persistentStore.getProjectNames();
|
||||
excludedFromDeletion.add(".wlgb");
|
||||
Util.deleteInDirectoryApartFrom(rootGitDirectory, excludedFromDeletion.toArray(new String[] {}));
|
||||
|
|
|
@ -42,11 +42,17 @@ public class ResourceFetcher {
|
|||
if (contents == null) {
|
||||
RawFile rawFile = new RepositoryObjectTreeWalker(repository).getDirectoryContents().getFileTable().get(path);
|
||||
if (rawFile == null) {
|
||||
throw new IllegalStateException("file was not in the current commit, or the git tree, yet path was not null");
|
||||
}
|
||||
Util.sout(
|
||||
"WARNING: " +
|
||||
"File " + path + " was not in the current commit, or the git tree, yet path was not null. " +
|
||||
"File url is: " + url
|
||||
);
|
||||
contents = fetch(projectName, url, path);
|
||||
} else {
|
||||
contents = rawFile.getContents();
|
||||
}
|
||||
}
|
||||
}
|
||||
return new RepositoryFile(newPath, contents);
|
||||
}
|
||||
|
||||
|
@ -83,5 +89,4 @@ public class ResourceFetcher {
|
|||
persistentStore.addURLIndexForProject(projectName, url, path);
|
||||
return contents;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,72 +1,20 @@
|
|||
package uk.ac.ic.wlgitbridge.data.model.db;
|
||||
|
||||
import uk.ac.ic.wlgitbridge.data.model.db.sql.SQLiteWLDatabase;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Winston on 19/11/14.
|
||||
* Created by m on 20/11/15.
|
||||
*/
|
||||
public class PersistentStore {
|
||||
public interface PersistentStore {
|
||||
List<String> getProjectNames();
|
||||
|
||||
private final SQLiteWLDatabase database;
|
||||
void setLatestVersionForProject(String project, int versionID);
|
||||
|
||||
public PersistentStore(File rootGitDirectory) {
|
||||
try {
|
||||
database = new SQLiteWLDatabase(rootGitDirectory);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
int getLatestVersionForProject(String project);
|
||||
|
||||
public List<String> getProjectNames() {
|
||||
try {
|
||||
return database.getProjectNames();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
public void setLatestVersionForProject(String project, int versionID) {
|
||||
try {
|
||||
database.setVersionIDForProject(project, versionID);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
void addURLIndexForProject(String projectName, String url, String path);
|
||||
|
||||
public int getLatestVersionForProject(String project) {
|
||||
try {
|
||||
return database.getVersionIDForProjectName(project);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void addURLIndexForProject(String projectName, String url, String path) {
|
||||
try {
|
||||
database.addURLIndex(projectName, url, path);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteFilesForProject(String project, String... files) {
|
||||
try {
|
||||
database.deleteFilesForProject(project, files);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
public String getPathForURLInProject(String projectName, String url) {
|
||||
try {
|
||||
return database.getPathForURLInProject(projectName, url);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
void deleteFilesForProject(String project, String... files);
|
||||
|
||||
String getPathForURLInProject(String projectName, String url);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
package uk.ac.ic.wlgitbridge.data.model.db;
|
||||
|
||||
import uk.ac.ic.wlgitbridge.data.model.db.sql.SQLiteWLDatabase;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Winston on 19/11/14.
|
||||
*/
|
||||
public class SqlitePersistentStore implements PersistentStore {
|
||||
|
||||
private final SQLiteWLDatabase database;
|
||||
|
||||
public SqlitePersistentStore(File rootGitDirectory) {
|
||||
try {
|
||||
database = new SQLiteWLDatabase(rootGitDirectory);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getProjectNames() {
|
||||
try {
|
||||
return database.getProjectNames();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void setLatestVersionForProject(String project, int versionID) {
|
||||
try {
|
||||
database.setVersionIDForProject(project, versionID);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLatestVersionForProject(String project) {
|
||||
try {
|
||||
return database.getVersionIDForProjectName(project);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addURLIndexForProject(String projectName, String url, String path) {
|
||||
try {
|
||||
database.addURLIndex(projectName, url, path);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFilesForProject(String project, String... files) {
|
||||
try {
|
||||
database.deleteFilesForProject(project, files);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getPathForURLInProject(String projectName, String url) {
|
||||
try {
|
||||
return database.getPathForURLInProject(projectName, url);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package uk.ac.ic.wlgitbridge.data.model;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockserver.model.HttpRequest.request;
|
||||
import static org.mockserver.model.HttpResponse.response;
|
||||
|
||||
import org.eclipse.jgit.lib.*;
|
||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||
import org.jmock.Expectations;
|
||||
import org.jmock.Mockery;
|
||||
import org.hamcrest.TypeSafeMatcher;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.mockserver.client.server.MockServerClient;
|
||||
import org.mockserver.junit.MockServerRule;
|
||||
import uk.ac.ic.wlgitbridge.data.model.db.PersistentStore;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by m on 20/11/15.
|
||||
*/
|
||||
public class ResourceFetcherTest {
|
||||
@Rule
|
||||
public MockServerRule mockServerRule = new MockServerRule(this);
|
||||
|
||||
private MockServerClient mockServerClient;
|
||||
|
||||
@Test
|
||||
public void fetchesFilesThatAreMissingFromUrlStoreCache() throws IOException {
|
||||
final String testProjectName = "123abc";
|
||||
final String testUrl = "http://localhost:" + mockServerRule.getHttpPort() + "/123abc";
|
||||
final String oldTestPath = "testPath";
|
||||
final String newTestPath = "missingPath";
|
||||
|
||||
mockServerClient.when(
|
||||
request()
|
||||
.withMethod("GET")
|
||||
.withPath("/123abc")
|
||||
)
|
||||
.respond(
|
||||
response()
|
||||
.withStatusCode(200)
|
||||
.withBody("content")
|
||||
);
|
||||
|
||||
final Mockery context = new Mockery();
|
||||
final PersistentStore persistentStore = context.mock(PersistentStore.class);
|
||||
context.checking(new Expectations() {{
|
||||
// It should fetch the file once it finds it is missing.
|
||||
oneOf(persistentStore).getPathForURLInProject(testProjectName, testUrl);
|
||||
will(returnValue(oldTestPath));
|
||||
|
||||
// It should update the URL index store once it has fetched; at present, it does not actually change the stored path.
|
||||
oneOf(persistentStore).addURLIndexForProject(testProjectName, testUrl, oldTestPath);
|
||||
}});
|
||||
|
||||
ResourceFetcher resourceFetcher = new ResourceFetcher(persistentStore);
|
||||
TemporaryFolder repositoryFolder = new TemporaryFolder();
|
||||
repositoryFolder.create();
|
||||
Repository repository = new FileRepositoryBuilder().setWorkTree(repositoryFolder.getRoot()).build();
|
||||
Map<String, byte[]> fetchedUrls = new HashMap<String, byte[]>();
|
||||
resourceFetcher.get(testProjectName, testUrl, newTestPath, repository, fetchedUrls);
|
||||
|
||||
// We don't bother caching in this case, at present.
|
||||
assertEquals(0, fetchedUrls.size());
|
||||
}
|
||||
}
|
|
@ -17,15 +17,12 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jmock:jmock-junit4:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jmock:jmock:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-library:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit-dep:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jmock:jmock-legacy:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cglib:cglib-nodep:2.1_3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.jmock:jmock-junit4:2.6.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.jmock:jmock:2.6.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit-dep:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.eclipse.jetty.aggregate:jetty-all:9.2.6.v20141205" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.websocket:javax.websocket-api:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
|
@ -44,5 +41,43 @@
|
|||
<orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.8.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-nop:1.7.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-netty:3.10.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-client-java:3.10.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-core:3.10.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec-socks:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jcraft:jzlib:1.1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcmail-jdk15on:1.52" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.52" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.json:json:20090211" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:json-schema-validator:2.2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.google.code.findbugs:jsr305:3.0.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.googlecode.libphonenumber:libphonenumber:6.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:json-schema-core:1.2.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:uri-template:0.9" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:msg-simple:1.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:btf:1.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.github.fge:jackson-coreutils:1.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mozilla:rhino:1.7R4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: javax.mail:mailapi:1.4.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:activation:1.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.sf.jopt-simple:jopt-simple:4.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: commons-io:commons-io:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-buffer:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-codec-http:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-common:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-handler:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: io.netty:netty-transport:4.0.31.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.bouncycastle:bcprov-jdk15on:1.52" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.google.guava:guava:18.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: janino:janino:2.5.10" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mock-server:mockserver-logging:3.10.1" level="project" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in a new issue