Access Keys:
Skip to content (Access Key - 0)

Maven MuleForge Deployer

The MuleForge Deployer is a Maven plug-in that helps with releasing MuleForge projects. It can be used to upload additional artifacts, namely schemas and distributions and can be configured to run as part of the maven release process.

Goals

muleforge:deploy-schema Will deploy the projects configuration schema (if one or more exist in src/main/resources/META-INF/*.xsd) to the central Maven repository
muleforge:deploy-distro Will deploy a project's release distribution to MuleForge. Its important to follow the [MuleForge Project Release Guide] as not to deploy a distribution that hadn't been manually tested first. Though if you do make a mistake, this Maven goal can be used to overwrite a previous distribution. This plugin looks for distribution archives under ./target/*.zip and *.tar.gz

Using with an existing MuleForge Project

It is required that existing MuleForge projects add the following configuration to the POM.xml files so that when performing a release the project artifacts get deployed to the correct locations. All that is required is that you add the following configuration (this is described below)-

<build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav</artifactId>
                <version>1.0-beta-2</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <encoding>ISO-8859-1</encoding>
                </configuration>
            </plugin>

            <!-- Responsible for creating the release distribution for this project -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <finalName>${artifactId}-${version}</finalName>
                    <descriptors>
                        <descriptor>assembly.xml</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.0-beta-7</version>
                <configuration>
                    <!-- We only do this at release time. However, before doing a
                        release of your project and deploying it you nedd to run 'mvn assembly:assembly' and check that
                        the distribution is created correctly -->
                    <preparationGoals>assembly:assembly</preparationGoals>
                </configuration>
            </plugin>

            <!-- Used for deploying zip and tar.gz  distributions to MuleForge. Called using:
           mvn muleforge:deploy-distro-->
            <plugin>
                <groupId>org.mule.tools</groupId>
                <artifactId>maven-muleforge-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>upload-muleforge-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <!-- Attached to the deploy lifecycle this plugin is Used for deploying any config schemas
                        for this module or transport -->
                            <goal>deploy-schema</goal>
                            <!-- Attached to the deploy lifecycle this plugin is Used for deploying the projects
                            distribution archives (generated from the assembly.xml descriptor) -->
                            <goal>deploy-distro</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
  • The maven-wagon extension is used for uploading files using WebDav.
  • The Compiler plugin just tells Maven which JDK version to compile against.
  • The Assembly plugin tells Maven where to find the assembly descriptor.
  • The Release clugin is configured so that the assembly:assembly goal is run as part of the release.
  • The MuleForge plugin is added at the end and tells Maven to run the deploy-distro and deploy-schema goals during the deploy phase.

Mule Archetypes

As of Mule 2.2.2 the Module, Transport and Example Maven Archetypes will automatically configure the project's POM.xml with this plug-in.

Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license