jawr-core
has the following dependency (see artifact details):
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<scope>provided</scope>
</dependency>
When processing LESS files I'm facing an exception saying java.lang.NoClassDefFoundError: org/mozilla/javascript/ScriptableObject
If adding rhino dependency explicitly with scope compile to my project the exception is gone.
But why Jawr has a dependency on it with scope provided when it is required to process LESS files?
The servlet container my webapp is running on is Tomcat 7.
jawr have made all their dependencies provided
, not just the rhino dependency.
It looks to me like they are really worried about getting in the way of your server's classpath.
At this link: http://jawr.java.net/docs/postprocessors.html#YUI_compressor, they state the following:
...which might be problematic if you already have rhino on your server's classpath...
Can only presume that is why they are all provided. You then explicitly need to include the dependencies that you require for the functionality of jawr that you want to use.