Font Size:
Ask Joget AI

Plugin Bundling Guide for OEM Builds

Overview

This guide explains how to bundle custom plugins with your OEM build of Joget. Plugins are bundled by downloading the JAR files and copying them to the target/wflow/app_plugins directory during the Maven build process.

Plugin Bundling Process

Plugins are integrated into the build using the Maven Ant plugin within your pom.xml file. The process involves downloading the plugin JAR files and copying them to the appropriate directory so they're included in the final distribution.

Bundling AI Designer and AI Central Config Plugins

To bundle the AI Designer and AI Central Config plugins, add the following configuration to your pom.xml within the maven-antrun-plugin execution section.

Option 1: Direct Download URLs

If you have direct download URLs for the plugin JARs:

<!-- Download AI Designer plugin -->

<get src="https://your-repository.com/path/to/ai-designer-plugin.jar" 

     dest="downloads/ai-designer-plugin.jar" 

     usetimestamp="true" />

 

<!-- Download AI Central Config plugin -->

<get src="https://your-repository.com/path/to/ai-central-config-plugin.jar" 

     dest="downloads/ai-central-config-plugin.jar" 

     usetimestamp="true" />

 

<!-- Copy both plugins to app_plugins directory -->

<copy file="downloads/ai-designer-plugin.jar" todir="target/wflow/app_plugins" />

<copy file="downloads/ai-central-config-plugin.jar" todir="target/wflow/app_plugins" />

Option 2: GitHub Releases (Automated Latest Version)

If the plugins are distributed via GitHub releases and you want to automatically fetch the latest version:

<!-- AI Designer Plugin -->

<get src="https://api.github.com/repos/your-org/ai-designer-plugin/releases/latest" 

     dest="downloads/ai-designer-release.json" 

     verbose="true" />

 

<replaceregexp file="downloads/ai-designer-release.json" 

               match=".*(https://github\.com/your-org/ai-designer-plugin/releases/download/.*\.jar).*" 

               replace="\1" 

               flags="g" />

 

<loadfile property="ai.designer.jar.link" srcFile="downloads/ai-designer-release.json">

    <filterchain>

        <striplinecomments>

            <comment value="**" />

        </striplinecomments>

    </filterchain>

</loadfile>

 

<get src="${ai.designer.jar.link}" dest="downloads/ai-designer-plugin.jar" usetimestamp="true" />

 

<!-- AI Central Config Plugin -->

<get src="https://api.github.com/repos/your-org/ai-central-config/releases/latest" 

     dest="downloads/ai-central-release.json" 

     verbose="true" />

 

<replaceregexp file="downloads/ai-central-release.json" 

               match=".*(https://github\.com/your-org/ai-central-config/releases/download/.*\.jar).*" 

               replace="\1" 

               flags="g" />

 

<loadfile property="ai.central.jar.link" srcFile="downloads/ai-central-release.json">

    <filterchain>

        <striplinecomments>

            <comment value="**" />

        </striplinecomments>

    </filterchain>

</loadfile>

 

<get src="${ai.central.jar.link}" dest="downloads/ai-central-config-plugin.jar" usetimestamp="true" />

 

<!-- Copy both plugins to app_plugins directory -->

<copy file="downloads/ai-designer-plugin.jar" todir="target/wflow/app_plugins" />

<copy file="downloads/ai-central-config-plugin.jar" todir="target/wflow/app_plugins" />

Option 3: Local Plugin Files

If you have the plugin JARs stored locally in your project:

<!-- Copy plugins from a local directory -->

<copy file="src/main/resources/plugins/ai-designer-plugin.jar" todir="target/wflow/app_plugins" />

<copy file="src/main/resources/plugins/ai-central-config-plugin.jar" todir="target/wflow/app_plugins" />

Integration Location in pom.xml

Add the plugin bundling code in the maven-antrun-plugin section of your pom.xml, specifically within the <target> element of the <configuration>.

Place it after the wflow directory setup and before the WAR file copying section. Look for this section in your pom.xml:

<unzip dest="target/wflow">

    <fileset dir="downloads/">

        <include name="glowroot-${glowroot.version}-dist.zip" />

    </fileset>

</unzip>

 

<!-- ADD YOUR PLUGIN BUNDLING CODE HERE -->

 

<copy flatten="true" todir="target/apache-tomcat-${tomcat.version}/webapps">

    <fileset dir="../[YourProject]-consoleweb/">

        <include name="*/jw.war" />

    </fileset>

</copy>

Complete Example

Here's a complete example adding both plugins using direct URLs:

<!-- Download AI Designer plugin -->

<get src="https://repository.example.com/ai-designer-plugin-8.2.3.jar" 

     dest="downloads/ai-designer-plugin.jar" 

     usetimestamp="true" />

 

<!-- Download AI Central Config plugin -->

<get src="https://repository.example.com/ai-central-config-plugin-8.0.0.jar" 

     dest="downloads/ai-central-config-plugin.jar" 

     usetimestamp="true" />

 

<!-- Copy plugins to app_plugins directory -->

<copy file="downloads/ai-designer-plugin.jar" todir="target/wflow/app_plugins" />

<copy file="downloads/ai-central-config-plugin.jar" todir="target/wflow/app_plugins" />

Verification

After building your project with mvn clean install, verify that the plugins are included:

  1. Check the target/wflow/app_plugins/ directory for the plugin JAR files

  2. Verify the plugins are included in the final distribution archives:

    • builds/[yourproject]-windows-${project.version}-${buildNumber}.zip

    • builds/[yourproject]-linux-${project.version}-${buildNumber}.tar.gz

  3. After installation, the plugins should appear automatically in the Joget Plugin Management interface

Important Notes

  • The usetimestamp="true" attribute ensures Maven only downloads the file if it's newer than the cached version
  • Plugin JARs must be compatible with your Joget version
  • Ensure you have the necessary permissions/credentials to access the plugin repositories
  • For private repositories, you may need to add authentication credentials to the <get> task
  • The target/wflow/app_plugins directory is automatically included in both Windows and Linux distribution packages

Troubleshooting

Plugin not appearing after installation:

  • Verify the JAR file is present in the app_plugins directory
  • Check that the plugin is compatible with your Joget version
  • Review Tomcat logs for any plugin loading errors

Download failures:

  • Confirm the download URLs are accessible
  • Check network connectivity and firewall settings
  • For authenticated repositories, verify credentials are correctly configured
Created by Debanraj Ravindran Last modified by Debanraj Ravindran on Apr 24, 2026