All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.archetype.xml Maven / Gradle / Ivy

Go to download

An architype for creating a Mule Module. It provides options for adding certain mule features and configuring the module for Muleforge.

The newest version!
<archetype>
    <!-- allows us to update an existing project if the archetype is run from the project directory -->
    <allowPartial>true</allowPartial>
    <id>maven-archetype-mule-module</id>
    <variables>
        <variable>
            <name>newProject</name>
            <description>Are you creating a new module (rather than updating an existing one)? [y] or [n]</description>
            <defvalue>y</defvalue>
            <variables>
                <variable>
                    <name>description</name>
                    <description>Provide a description of what the module does:</description>
                    <!-- Note that you always need a <defValue> element for -Dinteractive=false to work -->
                    <defvalue/>
                </variable>
                <variable>
                    <name>muleVersion</name>
                    <description>Which version of Mule is this module targeted at?</description>
                    <defvalue>${muleVersion}</defvalue>
                </variable>
                <variable>
                    <name>forgeRepo</name>
                    <description>Will this example be hosted in the MuleForge Maven repository? [y] or [n]</description>
                    <defvalue>y</defvalue>
                </variable>
                <variable>
                    <name>transports</name>
                    <description>Which Mule transports do you want to include in this module?

(options: cxf, ejb, file, ftp, http, https, imap, imaps, jbpm, jdbc,
          jetty, jetty-ssl, jms, jnp, multicast, pop3, pop3s, quartz, rmi, servlet,
          smtp, smtps, servlet, ssl, tls, stdio, tcp, udp, vm, xmpp)
                    </description>
                    <defvalue>vm</defvalue>
                </variable>
                <variable>
                    <name>modules</name>
                    <description>Which Mule modules do you want to include in this module?

(options: builders, client, doc, jaas, jbossts, management, ognl, pgp, scripting,
spring-extras, sxc, xml):

                    </description>
                    <defvalue>client</defvalue>
                </variable>
            </variables>
        </variable>
        <variable>
            <name>hasCustomSchema</name>
            <description>Will this module have a custom schema for configuring the module in Xml? [y] or [n]</description>
            <defvalue>y</defvalue>
        </variable>
        <variable>
            <name>hasBootstrap</name>
            <description>Will this module make objects available in the Registry as soon as it's loaded? [y] or [n]</description>
            <defvalue>n</defvalue>
        </variable>
    </variables>

    <templates>
        <!-- the template README should be run first since it sets up other variables and is always included -->
        <template>
            <file>README.vm</file>
            <output>MULE-README.txt</output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>README.vm</file>
            <output>MULE-UPDATE-README.txt</output>
            <dependsOnVar>newProject=n</dependsOnVar>
        </template>
        <template>
            <file>pom.vm</file>
            <output>pom.xml</output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>LICENSE.vm</file>
            <output>LICENSE.txt</output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>assembly.xml.vm</file>
            <output>assembly.xml</output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>

        <template>
            <file>src/main/java/org/mule/module/Messages.vm</file>
            <output>
                src/main/java/${package}/${ModuleNameLower}/i18n/${ModuleName}Messages.java
            </output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/java/org/mule/module/package.vm</file>
            <output>
                src/main/java/${package}/${ModuleNameLower}/package.html
            </output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/resources/META-INF/services/org/mule/i18n/messages.vm</file>
            <output>src/main/resources/META-INF/services/org/mule/i18n/${ModuleNameLower}-messages.properties
            </output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties.vm</file>
            <output>src/main/resources/META-INF/services/org/mule/config/registry-bootstrap.properties</output>
            <dependsOnVar>hasBootstrap=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/resources/META-INF/spring.handlers.vm</file>
            <output>src/main/resources/META-INF/spring.handlers</output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/resources/META-INF/spring.schemas.vm</file>
            <output>src/main/resources/META-INF/spring.schemas</output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/resources/META-INF/schema.vm</file>
            <output>src/main/resources/META-INF/mule-${ModuleNameLower}.xsd</output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>
        <template>
            <file>src/main/java/org/mule/module/config/NamespaceHandler.vm</file>
            <output>
                src/main/java/${package}/${ModuleNameLower}/config/${ModuleName}NamespaceHandler.java
            </output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>

        <!-- Test Cases -->
        <template>
            <file>src/test/java/org/mule/module/FunctionalTestCase.vm</file>
            <output>
                src/test/java/${package}/${ModuleNameLower}/${ModuleName}TestCase.java
            </output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>src/test/resources/functional-test-config.xml.vm</file>
            <output>
                src/test/resources/${ModuleNameLower}-functional-test-config.xml
            </output>
            <dependsOnVar>newProject=y</dependsOnVar>
        </template>
        <template>
            <file>src/test/java/org/mule/module/NamespaceHandlerTestCase.vm</file>
            <output>
                src/test/java/${package}/${ModuleNameLower}/${ModuleName}NamespaceHandlerTestCase.java
            </output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>
        <template>
            <file>src/test/resources/namespace-config.xml.vm</file>
            <output>
                src/test/resources/${ModuleNameLower}-namespace-config.xml
            </output>
            <dependsOnVar>hasCustomSchema=y</dependsOnVar>
        </template>
    </templates>
</archetype>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy