Skip to content

hoeggsoftware/mule-bundle-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mule Bundle Maven Plugin

Build Status Analytics

The Mule Bundle Maven Plugin allows you to package your Mule applications together into a single application bundle for deployment.

Maven Configuration

To generate a mule application bundle, create a new maven project. This project will serve as the application bundle, and will include each of the intended Mule applications as maven dependencies.

To make this work, configure the project to use this plugin, set the project's packaging to mule-bundle, and add dependencies for each of the applications you want included in the bundle.

Packaging

The bundle project must use mule-bundle as its packaging, which means it needs to generate a Mule Bundle artifact. Do this by including the packaging element in your pom.xml:

    <project ... > 
        <groupId>com.smartcompany.mule</groupId>
        <artifactId>our-mule-bundle</artifactId>
        <version>1.0.2-SNAPSHOT</version>
        <packaging>mule-bundle</packaging>

Plugin Configuration

Your bundle project must also explicitly include this plugin. Add it to the <plugins> section of your pom:

<build>
    <plugins>
        <plugin>
            <groupId>software.hoegg.mule</groupId>
            <artifactId>mule-bundle-maven-plugin</artifactId>
            <version>1.1.1</version>
            <extensions>true</extensions>
        </plugin>
    </plugins>
</build>

The extensions element is essential, as it allows the plugin to let Maven know it can support the packaging type mule-bundle we just configured in the last step.

Dependencies

Include applications in your bundle by adding them to the <dependencies> section of your pom, using the groupId , artifactId, and version to identify them. Because Mule applications are packaged as zip files, specify <type>zip</type> for each of them.

Our bundle dependencies might look something like this:

<dependencies>
    <dependency>
        <groupId>com.smartcompany.mule.microservice</groupId>
        <artifactId>widget-inventory-system-api</artifactId>
        <version>1.1.9</version>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>com.smartcompany.mule.microservice</groupId>
        <artifactId>widget-restocking-system-api</artifactId>
        <version>1.0.0</version>
        <type>zip</type>
    </dependency>
    <dependency>
        <groupId>com.smartcompany.mule.microservice</groupId>
        <artifactId>widget-replenishment-process-api</artifactId>
        <version>1.0.3</version>
        <type>zip</type>
    </dependency>
</dependencies>

Including files in the bundle

If you need to include files in the bundle that are not part of an included application, you can put them in /src/main/bundle. You might use this to create a single HTTP listener or Database Configuration that is used by more than one of the applications in the bundle.

We hope that you will be able to make use of this plugin. Please feel free to open isssues, or email us about any trouble you have getting it to work for you.

About

Maven plugin for combining Mule applications into one

Topics

Resources

License

Stars

0 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors