iDempiere uses OSGi (Open Services Gateway initiative) for its modular plugin architecture. Plugins allow you to extend functionality while keeping your code separate from the core.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/idempiere/idempiere/llms.txt
Use this file to discover all available pages before exploring further.
Plugin Types
iDempiere supports several plugin types:- Callout Plugins - Field-level business logic triggers
- Process Plugins - Batch processes and reports
- Model Validator Plugins - Document and model event handlers
- UI Extensions - Custom windows and forms
- Web Service Extensions - Custom REST/SOAP endpoints
Creating Your First Plugin
Create plugin directory structure
Create a new directory in the iDempiere source root:Create the standard OSGi structure:
Create MANIFEST.MF
Create Key sections explained:
META-INF/MANIFEST.MF with your bundle metadata:META-INF/MANIFEST.MF
Bundle-SymbolicName- Unique identifier for your pluginRequire-Bundle- Dependencies (org.adempiere.base is the core)Service-Component- Points to OSGi Declarative Services configurationExport-Package- Makes your classes available to other plugins
Plugin Example: Custom Process
Letās create a simple process plugin that sends email notifications.1. Create the Process Class
src/com/yourcompany/customplugin/SendCustomNotification.java
2. Register the Process
Processes using the
@org.adempiere.base.annotation.Process annotation are automatically discovered by iDempiereās process factory. No plugin.xml registration is needed.3. Create Process in Application Dictionary
Execute in the database to register your process:Alternative: Using Extension Points
For plugins that need explicit registration (like callouts and model validators), use extension points.Process with Extension Point
Createplugin.xml in your plugin root:
plugin.xml
OSGi Declarative Services
For services that need to be injected, use OSGi Declarative Services.Service Interface
src/com/yourcompany/customplugin/INotificationService.java
Service Implementation
src/com/yourcompany/customplugin/NotificationServiceImpl.java
Service Component XML
CreateOSGI-INF/NotificationServiceImpl.xml:
OSGI-INF/NotificationServiceImpl.xml
Building Your Plugin
Plugin Best Practices
Use unique package names
Use unique package names
Always use your company domain in reverse (e.g.,
com.yourcompany.plugin) to avoid namespace conflicts.Set EntityType = 'U' for customizations
Set EntityType = 'U' for customizations
In the Application Dictionary, use EntityType āUā (User) for your custom entities. This prevents conflicts with core updates.
Version your plugins
Version your plugins
Use semantic versioning (e.g., 1.0.0) and update the version in MANIFEST.MF when releasing changes.
Include migration scripts
Include migration scripts
Package your Application Dictionary changes as SQL migration scripts in
migration/ directory.Document your extensions
Document your extensions
Maintain README.md documenting what your plugin does, dependencies, and installation steps.
Testing Your Plugin
Unit Testing
Create test classes insrc-test/:
src-test/com/yourcompany/customplugin/NotificationTest.java
Integration Testing
Test in a development iDempiere instance:- Deploy your plugin
- Restart the server
- Log in and run your process from the menu
- Check logs in
log/directory
Next Steps
Callouts
Implement field-level triggers
Processes
Deep dive into process development
Model Validators
Handle document and model events