开发者

How do you use wro4j together with the Closure library and compiler?

I followed the instructions at here, though I substituted 1.3.8 for the version, and I'm able to compile my JS in a wildcard folder as I wanted, however, I'm not quite sure where to place the closure library files so the compiler will pick them up. Where is this configured?

[INFO] Wro4j Model path: .\src\main\webapp\WEB-INF\wro.xml
[INFO] targetGroups: closure
[INFO] minimize: true
[INFO] ignoreMissingRes开发者_如何学Goources: false
[INFO] destinationFolder: .\src\main\webapp\wro
[INFO] jsDestinationFolder: d:\static\compiled\js
[INFO] cssDestinationFolder: d:\static\compiled\css
[INFO] folder: d:\static\compiled\css
[INFO] processing group: closure.css
[INFO] file size: closure.css -> 0 bytes
[INFO] No content found for group: closure.css
[INFO] folder: d:\static\compiled\js
[INFO] processing group: closure.js
Jul 24, 2011 10:55:59 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /static/compiled/js/**:1: ERROR - required "goog.dom" namespace never provided
goog.require('goog.dom');
            ^

[INFO] file size: closure.js -> 204 bytes
[INFO] d:\static\compiled\js\closure.js (204bytes) has been created!
[INFO]


Add the js assets required by google closure (the ones containing "goog.dom" object) to the wro.xml model. Example:

    <groups>
      <group name="closure">
        <js>/path/to/goog-dom.js</js>
        <js>/files/*.js</js>
      </group>
    </groups>

If this doesn't help, post the same question on google closure & wro4j mailing list (to target the right audience). You could also provide a more detailed example with a quickstart project which would help to reproduce the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜