morph-pluginのレビューするよ

2019-05-12Grails

ようやく morphplugin - Google Code のソースレビューをしました。
教えていただいてから開始するまでに時間がかかってしまった。

ソースを見たところ・・・意外に機能が少ない。

どうやら、このプラグインは grails war コマンド実行時に、 web.xml の要素としてメールセッション情報を追加するだけのようでした。

class MorphGrailsPlugin {
    def version = 0.1
    def dependsOn = [:]
    def author = "Daniel Latorre"
    def authorEmail = "danilat83@gmail.com"

    def doWithWebDescriptor = { xml ->
        def env = System.getProperty("grails.env")
        if (env == "production") {
            def resourceRef = xml.'resource-ref'
            resourceRef + {
                'description'("Morphlabs Datasource")
                'res-ref-name'("jdbc/morph-ds")
                'res-type'("javax.sql.DataSource")
                'res-auth'("Container")
            }
        }
    }
}

意外と Morph開発専用のプラグインを作ってみよう | ゲンゾウ用ポストイット でやろうとしている機能のほうが機能的に豊富かも。やっぱりプラグイン開発してみようかな。

2019-05-12Grails