Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1278,17 +1278,6 @@
<artifactId>oauth2-oidc-sdk</artifactId>
<version>${oauth2.oidc.sdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>${s3.version}</version>
<exclusions>
<exclusion>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
Expand Down Expand Up @@ -1478,6 +1467,19 @@
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
</exclusion>
<exclusion>
<!-- The AWS SDK for S3 is 30 jars and 8.4 MiB of the distribution for a
protocol that most installations never crawl, and it moves faster than
Fess does. It ships in the fess-storage-s3 plugin instead, which carries
the SDK and registers S3Client with crawlerClientCreator. fess-crawler
still compiles S3Client against the SDK, so this exclusion is what keeps
the jars out of the war; the classes stay in fess-crawler.jar and cost a
few tens of KiB.
Do not relocate the SDK packages in that plugin: S3Client lives outside
its jar and resolves them by their original names. -->
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
/** The key of the configuration. e.g. http,https */
String CRAWLER_WEB_PROTOCOLS = "crawler.web.protocols";

/** The key of the configuration. e.g. file,smb,smb1,ftp,s3 */
/** The key of the configuration. e.g. file,smb,smb1,ftp */
String CRAWLER_FILE_PROTOCOLS = "crawler.file.protocols";

/** The key of the configuration. e.g. ^FESS_ENV_.* */
Expand Down Expand Up @@ -3571,7 +3571,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction

/**
* Get the value for the key 'crawler.file.protocols'. <br>
* The value is, e.g. file,smb,smb1,ftp,s3 <br>
* The value is, e.g. file,smb,smb1,ftp <br>
* comment: Supported file protocols for crawling.
* @return The value of found property. (NotNull: if not found, exception but basically no way)
*/
Expand Down Expand Up @@ -14560,7 +14560,7 @@ protected java.util.Map<String, String> prepareGeneratedDefaultMap() {
defaultMap.put(FessConfig.CRAWLER_DOCUMENT_FULLSTOP_CHARS, "u002eu06d4u2e3cu3002");
defaultMap.put(FessConfig.CRAWLER_CRAWLING_DATA_ENCODING, "UTF-8");
defaultMap.put(FessConfig.CRAWLER_WEB_PROTOCOLS, "http,https");
defaultMap.put(FessConfig.CRAWLER_FILE_PROTOCOLS, "file,smb,smb1,ftp,s3");
defaultMap.put(FessConfig.CRAWLER_FILE_PROTOCOLS, "file,smb,smb1,ftp");
defaultMap.put(FessConfig.CRAWLER_DATA_ENV_PARAM_KEY_PATTERN, "^FESS_ENV_.*");
defaultMap.put(FessConfig.CRAWLER_IGNORE_ROBOTS_TXT, "false");
defaultMap.put(FessConfig.CRAWLER_IGNORE_ROBOTS_TAGS, "false");
Expand Down
298 changes: 0 additions & 298 deletions src/main/java/org/codelibs/fess/storage/S3StorageClient.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ public static StorageType detectStorageType(final String endpoint) {
public static StorageClient createClient(final FessConfig fessConfig) {
final String componentName = componentName(fessConfig.getStorageType(), fessConfig.getStorageEndpoint());
if (!ComponentUtil.hasComponent(componentName)) {
throw new StorageException("No storage client is registered as " + componentName + " for storage.type="
+ fessConfig.getStorageType() + ". Install the plugin that provides it, such as fess-storage-gcs for gcs.");
throw new StorageException(
"No storage client is registered as " + componentName + " for storage.type=" + fessConfig.getStorageType()
+ ". Every backend ships as a fess-storage-* plugin: install fess-storage-s3 for s3 and s3_compat, "
+ "or fess-storage-gcs for gcs.");
}
if (logger.isDebugEnabled()) {
logger.debug("Creating {} for endpoint: {}", componentName, fessConfig.getStorageEndpoint());
Expand All @@ -87,10 +89,10 @@ public static StorageClient createClient(final FessConfig fessConfig) {
* Returns the name of the DI component that serves a storage type.
*
* <p>The mapping from a {@code storage.type} value to an implementation lives in the DI
* definition rather than here, which is what lets the clients ship as plugins: core no longer
* names GcsStorageClient or S3StorageClient, and a plugin registering
* {@code <type>StorageClient} is reachable by setting {@code storage.type=<type>}. The
* components are prototypes because every caller closes the client it was handed.</p>
* definition rather than here, which is what lets the clients ship as plugins: core names no
* implementation at all, and a plugin registering {@code <type>StorageClient} is reachable by
* setting {@code storage.type=<type>}. The components are prototypes because every caller
* closes the client it was handed.</p>
*
* @param typeStr the configured type, blank or {@code auto} to detect from the endpoint
* @param endpoint the storage endpoint, used only when detecting
Expand Down
Loading
Loading