【问题标题】:How to keep custom moqui components in a separate directory如何将自定义 moqui 组件保存在单独的目录中
【发布时间】:2015-09-12 09:09:31
【问题描述】:

假设我希望将自定义组件放在名为“cc”的目录中,该目录将位于“moqui-trunk”目录旁边。

dev/ |-- cc/ |-- moqui-trunk/

MoquiInit.properties 中有一个设置 moqui.runtime=../moqui/runtime

理想情况下,人们会认为将其更改为 ../cc 应该可以完成这项工作。但在下面还有另一个块,上面写着: if there is a "runtime" directory in the war file (in the root of the webapp) that will be used instead of this setting

我想如果我重命名/删除“moqui-trunk”目录中的“runtime”目录,那么它将开始从我的“cc”目录中挑选组件。但是我怎样才能通过对“moqui-trunk”的最小更改来实现相同的效果(以便轻松管理补丁、svn 更新等)。

【问题讨论】:

    标签: moqui


    【解决方案1】:

    我不知道你为什么要移动东西,但我这样做的方式是拥有三个 git repos a) Moqui b) Mantle c) 组件

    • Moqui 被 git 克隆到 /moqui
    • Mantle 被 git 克隆到 /moqui/runtime/mantle
    • 组件被 git 克隆到 /moqui/runtime/component

    在我的组件中,我有我的应用程序的子目录,这意味着我可以保持一切干净并尽可能靠近上游,这也意味着如果你在 /moqui 目录中,你可以 git pull 上游 Moqui变化,同样适用于 /moqui/runtime/mantle 的 Mantle 变化。

    还可以查看Making Apps with Moqui 这本书,它确实有助于解释在 Moqui 之上构建的基础知识。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多