Skip to content

Commit

Permalink
4.3.3604
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Feb 19, 2020
1 parent 900148d commit 8dc715c
Show file tree
Hide file tree
Showing 20 changed files with 932 additions and 75 deletions.
6 changes: 3 additions & 3 deletions Java/androidfsstorage/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
jarJar {
rules = [
'stax-api-1.0.1.jar' : 'javax.xml.** com.ithit.webdav.xml.@1',
'webdav-server-4.3.3576.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
'webdav-server-4.3.3605.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
]
}

Expand Down Expand Up @@ -71,11 +71,11 @@ dependencies {
implementation 'commons-io:commons-io:2.4'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation('com.ithit.webdav.integration:android-integration:4.3.3576', {
implementation('com.ithit.webdav.integration:android-integration:4.3.3605', {
exclude group: 'org.nanohttpd', module: 'nanohttpd'
})
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
jarJar 'stax:stax-api:1.0.1'
jarJar 'com.ithit.webdav:webdav-server:4.3.3576'
jarJar 'com.ithit.webdav:webdav-server:4.3.3605'
testImplementation 'junit:junit:4.12'
}
14 changes: 7 additions & 7 deletions Java/deltav/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ithit.webdav.samples</groupId>
<artifactId>deltav</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
<packaging>war</packaging>

<properties>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.ithit.webdav.integration</groupId>
<artifactId>servlet-integration</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
Expand Down Expand Up @@ -61,12 +61,12 @@
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.22</version>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.22</version>
<version>1.23</version>
<exclusions>
<exclusion>
<artifactId>cxf-core</artifactId>
Expand Down Expand Up @@ -125,7 +125,7 @@
<dependency>
<groupId>com.ithit.webdav</groupId>
<artifactId>webdav-server</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -165,7 +165,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/deltav-4.3.3576/META-INF</outputDirectory>
<outputDirectory>${project.build.directory}/deltav-4.3.3604/META-INF</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
Expand Down Expand Up @@ -244,7 +244,7 @@
<server>filesystem</server>
<port>11021</port>
<path>/</path>
<warSourceDirectory>target/deltav-4.3.3576</warSourceDirectory>
<warSourceDirectory>target/deltav-4.3.3604</warSourceDirectory>
</configuration>
</plugin>
<plugin>
Expand Down
12 changes: 6 additions & 6 deletions Java/filesystemstorage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ithit.webdav.samples</groupId>
<artifactId>filesystemstorage</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
<packaging>war</packaging>

<properties>
Expand Down Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>com.ithit.webdav.integration</groupId>
<artifactId>servlet-integration</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down Expand Up @@ -78,12 +78,12 @@
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.22</version>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.22</version>
<version>1.23</version>
<exclusions>
<exclusion>
<artifactId>cxf-core</artifactId>
Expand Down Expand Up @@ -142,7 +142,7 @@
<dependency>
<groupId>com.ithit.webdav</groupId>
<artifactId>webdav-server</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
Expand Down Expand Up @@ -228,7 +228,7 @@
<server>filesystem</server>
<port>11021</port>
<path>/</path>
<warSourceDirectory>target/filesystemstorage-4.3.3576</warSourceDirectory>
<warSourceDirectory>target/filesystemstorage-4.3.3604</warSourceDirectory>
</configuration>
</plugin>
<plugin>
Expand Down
14 changes: 7 additions & 7 deletions Java/oraclestorage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ithit.webdav.samples</groupId>
<artifactId>oraclestorage</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
<packaging>war</packaging>

<properties>
Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.ithit.webdav.integration</groupId>
<artifactId>servlet-integration</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
Expand Down Expand Up @@ -61,12 +61,12 @@
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.22</version>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.22</version>
<version>1.23</version>
<exclusions>
<exclusion>
<artifactId>cxf-core</artifactId>
Expand Down Expand Up @@ -125,7 +125,7 @@
<dependency>
<groupId>com.ithit.webdav</groupId>
<artifactId>webdav-server</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -165,7 +165,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/oraclestorage-4.3.3576/META-INF</outputDirectory>
<outputDirectory>${project.build.directory}/oraclestorage-4.3.3604/META-INF</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
Expand Down Expand Up @@ -244,7 +244,7 @@
<server>filesystem</server>
<port>11021</port>
<path>/</path>
<warSourceDirectory>target/oraclestorage-4.3.3576</warSourceDirectory>
<warSourceDirectory>target/oraclestorage-4.3.3604</warSourceDirectory>
</configuration>
</plugin>
<plugin>
Expand Down
89 changes: 86 additions & 3 deletions Java/springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
</parent>
<groupId>com.ithit.webdav.samples</groupId>
<artifactId>springboot</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
<name>springboot</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
<lucene-core.version>7.5.0</lucene-core.version>
<tika-core.version>1.23</tika-core.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -52,12 +54,12 @@
<dependency>
<groupId>com.ithit.webdav</groupId>
<artifactId>webdav-server</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>
<dependency>
<groupId>com.ithit.webdav.integration</groupId>
<artifactId>servlet-integration</artifactId>
<version>4.3.3576</version>
<version>4.3.3604</version>
</dependency>

<!-- JNA dependencies -->
Expand All @@ -81,6 +83,87 @@
<version>2.6</version>
<scope>compile</scope>
</dependency>

<!-- Search dependencies -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene-core.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${lucene-core.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${lucene-core.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>${tika-core.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>${tika-core.version}</version>
<exclusions>
<exclusion>
<artifactId>cxf-core</artifactId>
<groupId>org.apache.cxf</groupId>
</exclusion>
<exclusion>
<artifactId>cxf-rt-rs-client</artifactId>
<groupId>org.apache.cxf</groupId>
</exclusion>
<exclusion>
<artifactId>httpservices</artifactId>
<groupId>edu.ucar</groupId>
</exclusion>
<exclusion>
<artifactId>maven-scm-provider-svnexe</artifactId>
<groupId>org.apache.maven.scm</groupId>
</exclusion>
<exclusion>
<artifactId>maven-scm-api</artifactId>
<groupId>org.apache.maven.scm</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>c3p0</artifactId>
<groupId>c3p0</groupId>
</exclusion>
<exclusion>
<artifactId>httpclient</artifactId>
<groupId>org.apache.httpcomponents</groupId>
</exclusion>
<exclusion>
<artifactId>grib</artifactId>
<groupId>edu.ucar</groupId>
</exclusion>
<exclusion>
<artifactId>cdm</artifactId>
<groupId>edu.ucar</groupId>
</exclusion>
<exclusion>
<artifactId>unit-api</artifactId>
<groupId>javax.measure</groupId>
</exclusion>
<exclusion>
<artifactId>activation</artifactId>
<groupId>javax.activation</groupId>
</exclusion>
<exclusion>
<groupId>org.apache.sis.storage</groupId>
<artifactId>sis-netcdf</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.ithit.webdav.samples.springboot.common;

import com.ithit.webdav.samples.springboot.SpringBootSampleApplication;
import com.ithit.webdav.samples.springboot.configuration.WebDavConfigurationProperties;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.boot.system.ApplicationTemp;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePatternUtils;
Expand All @@ -26,22 +28,27 @@
@Component
public class ResourceReader {

public static String STORAGE_FOLDER = "Storage";
public static String STORAGE_FOLDER = "StorageRoot";
private static String INDEX_FOLDER = "Index";
private File root = new File(getRootFolder());
private static String LOCAL_STATIC_RESOURCES_FOLDER_PATH = "classpath:" + STORAGE_FOLDER + "/**";
ResourceLoader resourceLoader;
WebDavConfigurationProperties properties;

public void readFiles() {
Resource[] resources;
try {
final String storageRoot = "Storage";
String LOCAL_STATIC_RESOURCES_FOLDER_PATH = "classpath:" + storageRoot + "/**";
resources = ResourcePatternUtils.getResourcePatternResolver(resourceLoader)
.getResources(LOCAL_STATIC_RESOURCES_FOLDER_PATH);
for (Resource resource : resources) {
if (resource.exists() & resource.isReadable()) {
URL url = resource.getURL();
String urlString = url.toExternalForm();
String targetName = urlString.substring(urlString.indexOf("Storage"));
File destination = new File(root, URLDecoder.decode(targetName, StandardCharsets.UTF_8.toString()));
String targetName = urlString.substring(urlString.indexOf(storageRoot));
File destination = new File(root, Paths.get(STORAGE_FOLDER,
properties.getRootContext(),
URLDecoder.decode(targetName.substring(storageRoot.length()), StandardCharsets.UTF_8.toString())).toString());
if (!destination.exists()) {
FileUtils.copyURLToFile(url, destination);
}
Expand All @@ -56,6 +63,11 @@ public String getRootFolder() {
return home.getDir().getAbsolutePath();
}

public String getDefaultIndexFolder() {
ApplicationTemp temp = new ApplicationTemp(SpringBootSampleApplication.class);
return temp.getDir(INDEX_FOLDER).getAbsolutePath();
}

public String getDefaultPath() {
return Paths.get(getRootFolder(), STORAGE_FOLDER).toString();
}
Expand Down
Loading

0 comments on commit 8dc715c

Please sign in to comment.