This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch TIKA-4519
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/TIKA-4519 by this push:
new 05bb225be TIKA-4519 -- checkstyle through tika-app
05bb225be is described below
commit 05bb225bea4216ae54acfbbc0223cb7bfc263014
Author: tallison <[email protected]>
AuthorDate: Wed Nov 5 08:39:32 2025 -0500
TIKA-4519 -- checkstyle through tika-app
---
tika-app/pom.xml | 4 +-
.../test/java/org/apache/tika/cli/TikaCLITest.java | 1 -
tika-pipes/tika-async-cli/pom.xml | 32 +++++++++++
.../apache/tika/async/cli/AsyncProcessorTest.java | 62 ++++++++++++++++------
.../tika/pipes/emitter/fs/FileSystemEmitter.java | 1 -
.../pipes/emitter/fs/FileSystemEmitterFactory.java | 18 ++++++-
.../src/main/resources/plugin.properties | 2 +-
.../tika/pipes/fetcher/fs/FileSystemFetcher.java | 2 +-
.../pipes/fetcher/fs/FileSystemFetcherFactory.java | 16 ++++++
.../fetcher/fs/config/FileSystemFetcherConfig.java | 1 -
.../src/main/resources/plugin.properties | 2 +-
.../apache/tika/pipes/api/TikaPluginFactory.java | 14 -----
.../pipes/api/emitter/AbstractStreamEmitter.java | 3 --
.../tika/pipes/api/emitter/EmitterFactory.java | 19 ++++++-
.../tika/pipes/api/fetcher/FetcherFactory.java | 18 ++++++-
.../tika/pipes/core/emitter/EmitterManager.java | 1 -
.../tika/pipes/core/fetcher/EmptyFetcher.java | 1 -
.../tika/pipes/core/fetcher/FetcherManager.java | 1 -
.../apache/tika/plugins/AbstractTikaPlugin.java | 16 ++++++
.../org/apache/tika/plugins/PluginConfigs.java | 2 -
.../java/org/apache/tika/plugins/TikaPlugin.java | 16 ++++++
.../org/apache/tika/plugins/TikaPluginFactory.java | 16 ++++++
.../apache/tika/plugins/TikaPluginsManager.java | 18 ++++++-
.../tika/plugins/TikaPluginsManagerTest.java | 16 ++++++
24 files changed, 230 insertions(+), 52 deletions(-)
diff --git a/tika-app/pom.xml b/tika-app/pom.xml
index 28b558495..6da08caab 100644
--- a/tika-app/pom.xml
+++ b/tika-app/pom.xml
@@ -163,7 +163,7 @@
</artifactItems>
</configuration>
</execution>
- <!-- <execution>
+ <execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
@@ -176,7 +176,7 @@
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
</configuration>
- </execution> -->
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
index e028d9f03..59f051fa6 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
@@ -17,7 +17,6 @@
package org.apache.tika.cli;
import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.tika.cli.TikaCLIAsyncTest.JSON_TEMPLATE;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
diff --git a/tika-pipes/tika-async-cli/pom.xml
b/tika-pipes/tika-async-cli/pom.xml
index e1c02d5f1..c3b347a38 100644
--- a/tika-pipes/tika-async-cli/pom.xml
+++ b/tika-pipes/tika-async-cli/pom.xml
@@ -83,6 +83,38 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-plugins</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/plugins</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-fetcher-file-system</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-emitter-file-system</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git
a/tika-pipes/tika-async-cli/src/test/java/org/apache/tika/async/cli/AsyncProcessorTest.java
b/tika-pipes/tika-async-cli/src/test/java/org/apache/tika/async/cli/AsyncProcessorTest.java
index 49e85ba64..251269f28 100644
---
a/tika-pipes/tika-async-cli/src/test/java/org/apache/tika/async/cli/AsyncProcessorTest.java
+++
b/tika-pipes/tika-async-cli/src/test/java/org/apache/tika/async/cli/AsyncProcessorTest.java
@@ -25,12 +25,15 @@ import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.apache.tika.TikaTest;
import org.apache.tika.metadata.Metadata;
@@ -50,23 +53,38 @@ import org.apache.tika.serialization.JsonMetadataList;
*/
public class AsyncProcessorTest extends TikaTest {
+ private static final Logger LOG =
LoggerFactory.getLogger(AsyncProcessorTest.class);
+
+
final static String JSON_TEMPLATE_TEST = """
{
"plugins" : {
"fetchers": {
- "file-system-fetcher": {
- "basePath": "FETCHER_BASE_PATH",
- "extractFileSystemMetadata": false
+ "fsf":{
+ "file-system-fetcher": {
+ "basePath": "FETCHER_BASE_PATH",
+ "extractFileSystemMetadata": false
+ }
}
},
"emitters": {
- "file-system-emitter": {
- "basePath": "EMITTER_BASE_PATH",
- "fileExtension": "",
- "onExists":"EXCEPTION"
+ "fse-json": {
+ "file-system-emitter": {
+ "basePath": "JSON_EMITTER_BASE_PATH",
+ "fileExtension": "",
+ "onExists":"EXCEPTION"
+ }
+ },
+ "fse-bytes": {
+ "file-system-emitter": {
+ "basePath": "BYTES_EMITTER_BASE_PATH",
+ "fileExtension": "",
+ "onExists":"EXCEPTION"
+ }
}
}
- }
+ },
+ "pluginsPaths": "PLUGINS_PATHS"
}
""";
@@ -76,6 +94,8 @@ public class AsyncProcessorTest extends TikaTest {
private Path inputDir;
private Path outputDir;
+ private Path jsonOutputDir;
+ private Path bytesOutputDir;
private Path configDir;
@@ -86,6 +106,9 @@ public class AsyncProcessorTest extends TikaTest {
inputDir = basedir.resolve("input");
outputDir = basedir.resolve("output");
+ jsonOutputDir = outputDir.resolve("json");
+ bytesOutputDir = outputDir.resolve("bytes");
+
configDir = basedir.resolve("config");
@@ -93,12 +116,19 @@ public class AsyncProcessorTest extends TikaTest {
Files.createDirectories(configDir);
Files.createDirectories(inputDir);
+ Path pluginsDir = Paths.get("target/plugins");
+ if (! Files.isDirectory(pluginsDir)) {
+ LOG.warn("CAN'T FIND PLUGINS DIR. pwd={}",
Paths.get("").toAbsolutePath().toString());
+ }
+
tikaConfigPath = configDir.resolve("tika-config.xml");
Files.copy(AsyncProcessorTest.class.getResourceAsStream("/configs/tika-config-default.xml"),
tikaConfigPath);
Path pipesConfig = configDir.resolve("tika-pipes.json");
String jsonTemp = JSON_TEMPLATE_TEST
.replace("FETCHER_BASE_PATH",
inputDir.toAbsolutePath().toString())
- .replace("EMITTER_BASE_PATH",
outputDir.toAbsolutePath().toString());
+ .replace("JSON_EMITTER_BASE_PATH",
jsonOutputDir.toAbsolutePath().toString())
+ .replace("BYTES_EMITTER_BASE_PATH",
bytesOutputDir.toAbsolutePath().toString())
+ .replace("PLUGINS_PATHS",
pluginsDir.toAbsolutePath().toString());
Files.writeString(pipesConfig, jsonTemp, StandardCharsets.UTF_8);
@@ -110,22 +140,22 @@ public class AsyncProcessorTest extends TikaTest {
}
@Test
- public void testBasic() throws Exception {
+ public void testRecursiveUnpacking() throws Exception {
// TikaAsyncCLI cli = new TikaAsyncCLI();
// cli.main(new String[]{
configDir.resolve("tika-config.xml").toAbsolutePath().toString()});
AsyncProcessor processor = new AsyncProcessor(tikaConfigPath,
configDir.resolve("tika-pipes.json"));
EmbeddedDocumentBytesConfig embeddedDocumentBytesConfig = new
EmbeddedDocumentBytesConfig(true);
embeddedDocumentBytesConfig.setIncludeOriginal(true);
- embeddedDocumentBytesConfig.setEmitter("file-system-emitter");
+ embeddedDocumentBytesConfig.setEmitter("fse-bytes");
embeddedDocumentBytesConfig.setSuffixStrategy(EmbeddedDocumentBytesConfig.SUFFIX_STRATEGY.NONE);
embeddedDocumentBytesConfig.setEmbeddedIdPrefix("-");
ParseContext parseContext = new ParseContext();
parseContext.set(HandlerConfig.class,
HandlerConfig.DEFAULT_HANDLER_CONFIG);
parseContext.set(EmbeddedDocumentBytesConfig.class,
embeddedDocumentBytesConfig);
FetchEmitTuple t =
- new FetchEmitTuple("myId-1", new
FetchKey("file-system-fetcher", "mock.xml"),
- new EmitKey("file-system-emitter", "emit-1"), new
Metadata(), parseContext, FetchEmitTuple.ON_PARSE_EXCEPTION.EMIT);
+ new FetchEmitTuple("myId-1", new FetchKey("fsf", "mock.xml"),
+ new EmitKey("fse-json", "emit-1"), new Metadata(),
parseContext, FetchEmitTuple.ON_PARSE_EXCEPTION.EMIT);
processor.offer(t, 1000);
@@ -138,15 +168,15 @@ public class AsyncProcessorTest extends TikaTest {
}
processor.close();
- String container =
Files.readString(outputDir.resolve("emit-1-embed/emit-1-0"));
+ String container =
Files.readString(bytesOutputDir.resolve("emit-1-embed/emit-1-0"));
assertContains("\"dc:creator\">Nikolai Lobachevsky", container);
- String xmlEmbedded =
Files.readString(outputDir.resolve("emit-1-embed/emit-1-1"));
+ String xmlEmbedded =
Files.readString(bytesOutputDir.resolve("emit-1-embed/emit-1-1"));
assertContains("name=\"dc:creator\"", xmlEmbedded);
assertContains(">embeddedAuthor</metadata>", xmlEmbedded);
List<Metadata> metadataList;
- try (BufferedReader reader =
Files.newBufferedReader(outputDir.resolve("emit-1"))) {
+ try (BufferedReader reader =
Files.newBufferedReader(jsonOutputDir.resolve("emit-1"))) {
metadataList = JsonMetadataList.fromJson(reader);
}
assertEquals(2, metadataList.size());
diff --git
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitter.java
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitter.java
index 8b37e6ad6..aedfa87cb 100644
---
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitter.java
+++
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitter.java
@@ -28,7 +28,6 @@ import java.nio.file.StandardCopyOption;
import java.util.List;
import java.util.Optional;
-import org.pf4j.Extension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitterFactory.java
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitterFactory.java
index baca9e5a3..9285f1e00 100644
---
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitterFactory.java
+++
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/java/org/apache/tika/pipes/emitter/fs/FileSystemEmitterFactory.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.pipes.emitter.fs;
import java.io.IOException;
@@ -7,8 +23,6 @@ import org.pf4j.Extension;
import org.apache.tika.exception.TikaConfigException;
import org.apache.tika.pipes.api.emitter.Emitter;
import org.apache.tika.pipes.api.emitter.EmitterFactory;
-import org.apache.tika.pipes.api.fetcher.Fetcher;
-import org.apache.tika.pipes.api.fetcher.FetcherFactory;
import org.apache.tika.plugins.PluginConfig;
@Extension
diff --git
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/resources/plugin.properties
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/resources/plugin.properties
index 90125b375..a85876524 100644
---
a/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/resources/plugin.properties
+++
b/tika-pipes/tika-emitters/tika-emitter-file-system/src/main/resources/plugin.properties
@@ -18,4 +18,4 @@ plugin.id=file-system-emitter
plugin.class=org.apache.tika.pipes.emitter.fs.FileSystemEmitterPlugin
plugin.version=4.0.0-SNAPSHOT
plugin.provider=Local File System Emitter
-plugin.description=Capable of emitting the local file system
\ No newline at end of file
+plugin.description=Capable of emitting the local file system
diff --git
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcher.java
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcher.java
index 646d3ba50..9254662ca 100644
---
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcher.java
+++
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcher.java
@@ -38,9 +38,9 @@ import org.apache.tika.metadata.Metadata;
import org.apache.tika.metadata.Property;
import org.apache.tika.metadata.TikaCoreProperties;
import org.apache.tika.parser.ParseContext;
-import org.apache.tika.plugins.AbstractTikaPlugin;
import org.apache.tika.pipes.api.fetcher.Fetcher;
import org.apache.tika.pipes.fetcher.fs.config.FileSystemFetcherConfig;
+import org.apache.tika.plugins.AbstractTikaPlugin;
import org.apache.tika.plugins.PluginConfig;
import org.apache.tika.plugins.PluginConfigs;
import org.apache.tika.utils.StringUtils;
diff --git
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcherFactory.java
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcherFactory.java
index fa8bb433d..c3ee18a92 100644
---
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcherFactory.java
+++
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/FileSystemFetcherFactory.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.pipes.fetcher.fs;
import java.io.IOException;
diff --git
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/config/FileSystemFetcherConfig.java
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/config/FileSystemFetcherConfig.java
index ff1e06608..7560b4d2e 100644
---
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/config/FileSystemFetcherConfig.java
+++
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/java/org/apache/tika/pipes/fetcher/fs/config/FileSystemFetcherConfig.java
@@ -19,7 +19,6 @@ package org.apache.tika.pipes.fetcher.fs.config;
import java.io.IOException;
import com.fasterxml.jackson.core.JacksonException;
-import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.tika.exception.TikaConfigException;
diff --git
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/resources/plugin.properties
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/resources/plugin.properties
index 493c8d155..a317ce137 100644
---
a/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/resources/plugin.properties
+++
b/tika-pipes/tika-fetchers/tika-fetcher-file-system/src/main/resources/plugin.properties
@@ -18,4 +18,4 @@ plugin.id=file-system-fetcher
plugin.class=org.apache.tika.pipes.fetcher.fs.FileSystemFetcherPlugin
plugin.version=4.0.0-SNAPSHOT
plugin.provider=Local File System Fetcher
-plugin.description=Capable of emitting the local file system
\ No newline at end of file
+plugin.description=Capable of emitting the local file system
diff --git
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/TikaPluginFactory.java
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/TikaPluginFactory.java
deleted file mode 100644
index b98b0830d..000000000
---
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/TikaPluginFactory.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.apache.tika.pipes.api;
-
-import java.io.IOException;
-
-import org.pf4j.ExtensionPoint;
-
-import org.apache.tika.exception.TikaConfigException;
-import org.apache.tika.plugins.PluginConfig;
-import org.apache.tika.plugins.TikaPlugin;
-
-public interface TikaPluginFactory<T extends TikaPlugin> extends
ExtensionPoint {
-
- T buildPlugin(PluginConfig pluginConfig) throws IOException,
TikaConfigException;
-}
diff --git
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/AbstractStreamEmitter.java
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/AbstractStreamEmitter.java
index 5011ed01e..fc486c9a7 100644
---
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/AbstractStreamEmitter.java
+++
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/AbstractStreamEmitter.java
@@ -17,11 +17,8 @@
package org.apache.tika.pipes.api.emitter;
import java.io.IOException;
-import java.io.InputStream;
import java.util.List;
-import java.util.Properties;
-import org.apache.tika.exception.TikaConfigException;
import org.apache.tika.plugins.AbstractTikaPlugin;
import org.apache.tika.plugins.PluginConfig;
diff --git
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/EmitterFactory.java
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/EmitterFactory.java
index 1b1768abe..3a09e498c 100644
---
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/EmitterFactory.java
+++
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/emitter/EmitterFactory.java
@@ -1,7 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.pipes.api.emitter;
-import org.apache.tika.pipes.api.TikaPluginFactory;
-import org.apache.tika.pipes.api.fetcher.Fetcher;
+import org.apache.tika.plugins.TikaPluginFactory;
public interface EmitterFactory extends TikaPluginFactory<Emitter> {
diff --git
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/fetcher/FetcherFactory.java
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/fetcher/FetcherFactory.java
index 35d0f930c..5a77b245e 100644
---
a/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/fetcher/FetcherFactory.java
+++
b/tika-pipes/tika-pipes-api/src/main/java/org/apache/tika/pipes/api/fetcher/FetcherFactory.java
@@ -1,6 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.pipes.api.fetcher;
-import org.apache.tika.pipes.api.TikaPluginFactory;
+import org.apache.tika.plugins.TikaPluginFactory;
public interface FetcherFactory extends TikaPluginFactory<Fetcher> {
diff --git
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/emitter/EmitterManager.java
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/emitter/EmitterManager.java
index 3942c2960..a92bb5220 100644
---
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/emitter/EmitterManager.java
+++
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/emitter/EmitterManager.java
@@ -21,7 +21,6 @@ import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
diff --git
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/EmptyFetcher.java
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/EmptyFetcher.java
index 36375efc3..187a1e22f 100644
---
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/EmptyFetcher.java
+++
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/EmptyFetcher.java
@@ -19,7 +19,6 @@ package org.apache.tika.pipes.core.fetcher;
import java.io.IOException;
import java.io.InputStream;
-import org.apache.tika.exception.TikaConfigException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.ParseContext;
diff --git
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/FetcherManager.java
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/FetcherManager.java
index 065d47299..72ac30c1d 100644
---
a/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/FetcherManager.java
+++
b/tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/FetcherManager.java
@@ -26,7 +26,6 @@ import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import com.fasterxml.jackson.databind.JsonNode;
import org.pf4j.DefaultPluginManager;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
diff --git
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/AbstractTikaPlugin.java
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/AbstractTikaPlugin.java
index 8762ee861..1eeab67f6 100644
---
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/AbstractTikaPlugin.java
+++
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/AbstractTikaPlugin.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.plugins;
public class AbstractTikaPlugin implements TikaPlugin {
diff --git
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/PluginConfigs.java
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/PluginConfigs.java
index 9d93021bf..7e82a2088 100644
--- a/tika-plugins-core/src/main/java/org/apache/tika/plugins/PluginConfigs.java
+++ b/tika-plugins-core/src/main/java/org/apache/tika/plugins/PluginConfigs.java
@@ -16,10 +16,8 @@
*/
package org.apache.tika.plugins;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
diff --git
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPlugin.java
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPlugin.java
index aa1d6b330..b8966f975 100644
--- a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPlugin.java
+++ b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPlugin.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.plugins;
/**
diff --git
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginFactory.java
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginFactory.java
index 85fab8c71..27082c894 100644
---
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginFactory.java
+++
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginFactory.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.plugins;
import java.io.IOException;
diff --git
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginsManager.java
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginsManager.java
index 4694edd02..f28a916cf 100644
---
a/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginsManager.java
+++
b/tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginsManager.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.plugins;
import java.io.BufferedReader;
@@ -84,7 +100,7 @@ public class TikaPluginsManager {
throw new TikaConfigException("Couldn't find node for item=" +
item + " id=" + id);
}
int cnt = 0;
- for (Iterator<String> pluginIds = pluginNode.fieldNames();
pluginIds.hasNext(); ){
+ for (Iterator<String> pluginIds = pluginNode.fieldNames();
pluginIds.hasNext(); ) {
String pluginId = pluginIds.next();
if (++cnt > 1) {
throw new TikaConfigException("Can only have one pluginId
per id: id= " + id + " pluginId=" + pluginId);
diff --git
a/tika-plugins-core/src/test/java/org/apache/tika/plugins/TikaPluginsManagerTest.java
b/tika-plugins-core/src/test/java/org/apache/tika/plugins/TikaPluginsManagerTest.java
index 542b4aa0c..bc09ba5d9 100644
---
a/tika-plugins-core/src/test/java/org/apache/tika/plugins/TikaPluginsManagerTest.java
+++
b/tika-plugins-core/src/test/java/org/apache/tika/plugins/TikaPluginsManagerTest.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
package org.apache.tika.plugins;
import static org.junit.jupiter.api.Assertions.assertEquals;