| name | idempiere-cli-build-deploy |
| description | Build, deploy, and distribute iDempiere plugins using Maven and idempiere-cli. Use when the user wants to compile, deploy, or distribute their iDempiere plugin. |
iDempiere CLI - Build, Deploy and Distribute
This skill guides you through building, deploying, and distributing iDempiere plugins.
Workflow
- Build: Compile the plugin using Maven/Tycho (
./mvnw verify).
- Deploy: Install the built plugin to an iDempiere instance (
idempiere-cli deploy).
- Distribute: Create distributable archives (
idempiere-cli dist).
Build
Compiles the plugin into an OSGi bundle (JAR) placed in target/. Use Maven directly:
./mvnw verify
./mvnw clean verify -DskipTests
mvnw.cmd verify
Dependency Resolution
Deploy
Installs the built JAR to an iDempiere instance.
idempiere-cli deploy --target=/opt/idempiere
idempiere-cli deploy --target=/opt/idempiere --hot
idempiere-cli deploy --target=/opt/idempiere --hot \
--osgi-host=192.168.1.100 --osgi-port=12612
idempiere-cli deploy --dir=/path/to/my-plugin --target=/opt/idempiere
Deploy Modes
| Mode | Flag | Restart Required | How It Works |
|---|
| Copy deploy | - | Yes | Copies JAR to plugins/ directory |
| Hot deploy | --hot | No | Installs via OSGi console (port 12612) |
Deploy Options
| Option | Default | Description |
|---|
--dir | . | Plugin directory |
--target | (required) | Path to iDempiere installation |
--hot | false | Hot deploy via OSGi console |
--osgi-host | localhost | OSGi console host |
--osgi-port | 12612 | OSGi console port |
Hot Deploy Requirements
Hot deploy requires the OSGi console to be enabled in iDempiere. The console listens on port 12612 by default.
Distribute
Creates distributable packages. Auto-detects project type (core or plugin).
idempiere-cli dist --dir=./my-plugin
idempiere-cli dist --dir=./my-plugin --skip-build
idempiere-cli dist --source-dir=./idempiere
idempiere-cli dist --source-dir=./idempiere --skip-build
What dist produces
| Project Type | Artifacts |
|---|
| Plugin (standalone) | pluginId-version.zip (JAR + metadata) + checksums |
| Plugin (multi-module with p2) | pluginId-version.zip + pluginId-version-p2.zip (p2 repository) + checksums |
| Core | Per-platform server ZIPs (Linux/Windows/macOS) + checksums |
Dist Options
| Option | Default | Description |
|---|
--dir | - | Plugin project directory |
--source-dir | . | iDempiere core source directory |
--skip-build | false | Skip Maven build, use existing artifacts |
--clean | false | Run clean before build |
--version-label | - | Version label (default: auto-detect) |
--output | dist | Output directory |
Complete Workflow Example
cd org.mycompany.myplugin
./mvnw clean verify
idempiere-cli validate
idempiere-cli deploy --target=/opt/idempiere --hot
idempiere-cli dist --dir=. --skip-build
CI/CD Integration
idempiere-cli validate --strict --quiet
idempiere-cli dist --dir=.
Notes
- Always build (
./mvnw verify) before deploy. The dist command builds automatically unless --skip-build is used.
- For multi-module projects, run from the project root.
- Hot deploy is the fastest development cycle but requires OSGi console access.