[
https://issues.apache.org/jira/browse/TIKA-4587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18047053#comment-18047053
]
Nicholas DiPiazza commented on TIKA-4587:
-----------------------------------------
Successfully implemented and tested Maven dev profile for running tika-grpc in
development mode!
h3. Maven Dev Profile Usage
{code:bash}
# 1. Build all plugins once
cd tika-pipes/tika-pipes-plugins && mvn compile
# 2. Run tika-grpc with dev profile
cd ../../tika-grpc && mvn compile exec:java -Pdev
{code}
The dev profile automatically:
* Sets {{tika.plugin.dev.mode=true}}
* Configures pf4j to run in DEVELOPMENT mode
* Loads all 13 plugins from {{target/classes}} directories
* Starts gRPC server on port 50052
* Uses {{dev-config.json}} configuration file
h3. Implementation Details
* Fixed ignite plugin compilation error (needed tika-pipes-core built first
with ConfigStoreFactory)
* Set {{pf4j.mode}} system property to enable pf4j's DEVELOPMENT mode
* Override {{createPluginDescriptorFinder()}} to use
{{PropertiesPluginDescriptorFinder}} (looks for plugin.properties instead of
MANIFEST.MF)
* Override {{createPluginRepository()}} to prevent scanning subdirectories
* Added Maven exec plugin configuration with dev profile in tika-grpc/pom.xml
* Created dev-config.json with all plugin paths
Successfully tested - plugins load from {{target/classes}} without ZIP
packaging!
> Add pf4j development mode support to TikaPluginManager
> ------------------------------------------------------
>
> Key: TIKA-4587
> URL: https://issues.apache.org/jira/browse/TIKA-4587
> Project: Tika
> Issue Type: Improvement
> Components: tika-pipes
> Reporter: Nicholas DiPiazza
> Priority: Minor
>
> h2. Problem
> Currently, TikaPluginManager requires plugins to be packaged as ZIP files in
> the configured plugin-roots directories. This adds friction to plugin
> development since developers must rebuild and repackage plugins as ZIPs to
> test changes.
> h2. Solution
> Add support for pf4j's development mode which allows loading plugins directly
> from unpackaged directories (e.g., target/classes). This would enable faster
> development iteration by eliminating the ZIP packaging step during
> development.
> h2. Implementation Approach
> * Add a way to configure RuntimeMode (DEVELOPMENT vs DEPLOYMENT) in
> TikaPluginManager
> * When in DEVELOPMENT mode, allow plugin-roots to point to unpackaged plugin
> directories
> * Configure via environment variable (TIKA_PLUGIN_DEV_MODE) or system
> property (tika.plugin.dev.mode)
> * Skip ZIP extraction when in development mode
> * Default to DEPLOYMENT mode for backward compatibility
> h2. Benefits
> * Faster plugin development cycle - no need to rebuild ZIP files during
> development
> * Easier debugging of plugin code
> * Consistent with pf4j best practices
> h2. References
> * pf4j development mode docs: https://pf4j.org/doc/development-mode.html
> * Pull request: https://github.com/apache/tika/pull/new/pf4j-development-mode
--
This message was sent by Atlassian Jira
(v8.20.10#820010)