Loading ...
Sorry, an error occurred while loading the content.

[YUICompressor] Solving problem because of different Rhino jars in classpath

Expand Messages
  • agentsinaction
    Hi. If you re having problems because there are other libraries which depends on an other Mozilla Rhino implementation you can do the following so that the
    Message 1 of 2 , Jul 1, 2009
    • 0 Attachment
      Hi.

      If you're having problems because there are other libraries which depends on an other Mozilla Rhino implementation you can do the following so that the YUICompressor uses its own Rhino version exclusive (to the YUI developer: Please do this with your binary release):

      1. Download JARJAR from http://code.google.com/p/jarjar
      2. Create a rules file (e.g. yui-rules.txt) with this content:

      rule jargs.gnu.** com.yahoo.platform.yui.@0
      rule org.mozilla.** com.yahoo.platform.yui.@0
      keep com.yahoo.**

      3. Generate a new YUICompressor JAR with all(!) classes inside the com.yahoo.platform.yui context so no more library conflicts will be possible:

      java -jar jarjar-1.0.jar process yui-rules.txt yuicompressor-2.4.2.jar yuicompressor-jarjar-2.4.2.jar

      Now use the newly created yuicompressor-jarjar-2.4.2.jar in your app.

      Cheers,
      Jörn
    • blakesys
      Thanks for the tip! This will be very useful!
      Message 2 of 2 , Jul 5, 2009
      • 0 Attachment
        Thanks for the tip! This will be very useful!

        --- In ydn-javascript@yahoogroups.com, "agentsinaction" <heid@...> wrote:
        >
        > Hi.
        >
        > If you're having problems because there are other libraries which depends on an other Mozilla Rhino implementation you can do the following so that the YUICompressor uses its own Rhino version exclusive (to the YUI developer: Please do this with your binary release):
        >
        > 1. Download JARJAR from http://code.google.com/p/jarjar
        > 2. Create a rules file (e.g. yui-rules.txt) with this content:
        >
        > rule jargs.gnu.** com.yahoo.platform.yui.@0
        > rule org.mozilla.** com.yahoo.platform.yui.@0
        > keep com.yahoo.**
        >
        > 3. Generate a new YUICompressor JAR with all(!) classes inside the com.yahoo.platform.yui context so no more library conflicts will be possible:
        >
        > java -jar jarjar-1.0.jar process yui-rules.txt yuicompressor-2.4.2.jar yuicompressor-jarjar-2.4.2.jar
        >
        > Now use the newly created yuicompressor-jarjar-2.4.2.jar in your app.
        >
        > Cheers,
        > Jörn
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.