mule开发(一)

mule的安装

我在官方网站下载的是mule-standalone-4.1.1.zip
解压,在环境变量中添加:

export MULE_HOME=/usr/local/opt/mule-standalone-4.1.1
export PATH=$PATH:$MULE_HOME/bin

执行mule即可启动服务
如果需要daemon启动的话,运行mule start

使用mvn创建mule项目

参考https://docs.mulesoft.com/mule-user-guide/v/3.5/building-a-mule-application-with-maven-outside-studio

Add the two blocks of code to the file settings.xml (usually in your Maven conf or $HOME/.m2 directory)

This will have Maven allow you to execute Mule plugins:

settings.xml


    
        org.mule.tools
    
    ...
<profile>
    <id>Mule Orgid>
    <activation>
        <activeByDefault>trueactiveByDefault>
    activation>
    <repositories>
        <repository>
            <id>mulesoft-releasesid>
            <name>MuleSoft Repositoryname>
            <url>https://repository-master.mulesoft.org/releases/url>
            <layout>defaultlayout>
        repository>
        <repository>
            <id>mulesoft-snapshotsid>
            <name>MuleSoft Snapshot Repositoryname>
            <url>https://repository-master.mulesoft.org/snapshots/url>
            <layout>defaultlayout>
        repository>
    repositories>
profile>
mvn mule-project-archetype:create -DartifactId=helloWorld -DmuleVersion=3.9.0

目前最高到3.9.0

你可能感兴趣的:(esb)