[ 
https://issues.apache.org/jira/browse/TIKA-4587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046957#comment-18046957
 ] 

ASF GitHub Bot commented on TIKA-4587:
--------------------------------------

nddipiazza opened a new pull request, #2473:
URL: https://github.com/apache/tika/pull/2473

   ## JIRA Ticket
   https://issues.apache.org/jira/browse/TIKA-4587
   
   ## Summary
   Adds support for pf4j's development mode to TikaPluginManager, allowing 
plugin development without packaging as ZIP files.
   
   ## Changes
   - Added RuntimeMode configuration to TikaPluginManager
   - Configure via system property: `-Dtika.plugin.dev.mode=true`
   - Configure via environment variable: `TIKA_PLUGIN_DEV_MODE=true`
   - Skip ZIP extraction when in DEVELOPMENT mode
   - Added unit tests to verify mode configuration
   - Defaults to DEPLOYMENT mode for backward compatibility
   
   ## Testing
   - All existing tests pass
   - Added new tests: TikaPluginManagerTest
     - testDefaultRuntimeModeIsDeployment
     - testDevelopmentModeViaSystemProperty
     - testDeploymentModeWhenPropertyIsFalse
   - Integration tests pass (PluginManagerTest)
   
   ## Benefits
   - Faster plugin development cycle - developers can point plugin-roots 
directly at `target/classes`
   - Easier debugging - no need to rebuild ZIPs after each code change
   - Aligns with pf4j best practices: https://pf4j.org/doc/development-mode.html
   
   ## Review Focus Areas
   - **Configuration handling**: System property and environment variable 
precedence
   - **Backward compatibility**: Defaults to DEPLOYMENT mode when not configured
   - **Test coverage**: Unit tests verify both modes work correctly
   
   ## Files Modified
   - 
`tika-plugins-core/src/main/java/org/apache/tika/plugins/TikaPluginManager.java`
   - 
`tika-plugins-core/src/test/java/org/apache/tika/plugins/TikaPluginManagerTest.java`
 (new)




> 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)

Reply via email to