美文网首页
emqx v3.2.0 集成自定义插件

emqx v3.2.0 集成自定义插件

作者: Suncy | 来源:发表于2019-12-05 18:09 被阅读0次
#clone emqx_plugin_template 插件项目
git clone https://github.com/emqx/emqx-plugin-template.git

#删除当前上游,并且将自己仓库地址设为当前项目的上游,注,该仓库必须为公有仓库,并且开发完成后需要打tag。
git remote rm origin
git remote add origin https://gitee.com/suncy666/emqx_plugin_customize.git
git pull

#将插件项目完成后推送至远程,并且打好标签 suncy3.2.1
git push
#打标签
git tag -a suncy3.2.1 -m "测试emqx自定义插件" master
#提交标签
git push origin/master suncy3.2.1

#至此插件项目完成
#clone emqx-rel v3.2.0项目
git clone -b v3.2.0 https://github.com/emqx/emqx-rel.git

#修改根目录下的rebar.config文件
修改如下:
{deps,
    [ emqx
    , emqx_retainer
    , emqx_management
    , emqx_reloader
    , emqx_bridge_mqtt
    , emqx_sn
    , emqx_coap
    , emqx_stomp
    , emqx_auth_clientid
    , emqx_auth_username
    , emqx_auth_http
    , emqx_auth_jwt
    , emqx_auth_mysql
    , emqx_web_hook
    , emqx_delayed_publish
    , emqx_recon
    , emqx_psk_file
    , emqx_rule_engine
    , emqx_plugin_template
    //以下为添加的代码(tag一定不能填错,不然make会失败。)
    , {emqx_plugin_customize, {git, "https://gitee.com/suncy666/emqx_plugin_customize.git", {tag, "suncy3.2.1"}}}
    ]}.

{relx,
        ...........
         //以下为添加代码
        , {emqx_plugin_customize, load}
        ]}

#修改Makefile文件:

CT_APPS := emqx_auth_jwt emqx_auth_mysql emqx_auth_username \
                emqx_delayed_publish emqx_management emqx_recon emqx_rule_enginex \
                emqx_stomp emqx_auth_clientid  emqx_auth_ldap   emqx_auth_pgsql \
                emqx_coap emqx_lua_hook emqx_passwd emqx_reloader emqx_sn \
                emqx_web_hook emqx_auth_http emqx_auth_mongo emqx_auth_redis \
                emqx_dashboard emqx_lwm2m emqx_psk_file emqx_retainer emqx_statsd \
   // 以下为添加代码
                emqx_plugin_customize
#退出后make即可
图片.png 图片.png 图片.png

相关文章

网友评论

      本文标题:emqx v3.2.0 集成自定义插件

      本文链接:https://www.haomeiwen.com/subject/jmkjgctx.html