Wro4j with YUI Compressor

122 views
Skip to first unread message

Brijesh Kachalia

unread,
Jun 21, 2013, 12:01:44 PM6/21/13
to wr...@googlegroups.com
I have YUI compressor jars in the web-inf folder & below is the setting of wro.properties. I did remove YUI compressor jars & also the managerFactory to "ExtensionsConfigurableWroManagerFactory" to see if it works however whenever i add yuiJsMin it gives me 404 error on browser. 

When postProcessors value is change to jsMin it however works. Let me know if additional filters & jars needs to be added to work this. Web.xml entries are give below.

wro.properties
------------------------
managerFactoryClassName=ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory
preProcessors=cssUrlRewriting,cssImport,semicolonAppender
postProcessors=lessCss,yuiJsMin,yuiCssMin
gzipResources=true

web.xml
------------------
<filter>
  <filter-name>WebResourceOptimizer</filter-name>
  <filter-class>
    ro.isdc.wro.http.WroFilter
  </filter-class>
</filter>
 
<filter-mapping>
  <filter-name>WebResourceOptimizer</filter-name>
  <url-pattern>/wro/*</url-pattern>
</filter-mapping>

Alex Objelean

unread,
Jun 21, 2013, 12:05:47 PM6/21/13
to wr...@googlegroups.com
If you don't use maven and want to add all the transitive dependencies manually, at least what you can do is to checkout the wro4j-demo project, build it and add all the dependencies found in the WEB-INF/lib folder. 

Let me know if that works for you or if you have any other questions.

Cheers, 
Alex

On Friday, 21 June 2013 19:01:44 UTC +3, Brijesh Kachalia wrote:
I have YUI Compressor jars in the Web-inf Folder & below is the setting of wro.properties. YUI Compressor I did Remove jars & also the managerFactory to " ExtensionsConfigurableWroManag erFactory "to see IF it works however it WHENEVER i Gives me 404 Add yuiJsMin error on browser. 

When postProcessors value is change to jsMin it however works. Let me know if additional filters & jars needs to be added to work this. Web.xml entries are give below.

wro.properties
------------------------
managerFactoryClassName = RO. isdc.wro.manager.factory. ConfigurableWroManagerFactory
preprocessors = cssUrlRewriting, cssImport, semicolonAppender
postProcessors = lessCss, yuiJsMin, yuiCssMin
gzipResources = true

web.xml
------------------
<filter>
  <filter-name> WebResourceOptimizer </ Filter- name>
  <filter-class>
    ro.isdc.wro.http.WroFilter
  </ Filter-class>
</ Filter>
 
<filter-mapping>
  <filter-name> WebResourceOptimizer </ Filter- name>
  <url-pattern> / WRO / * </ url- pattern>
</ Filter-mapping>

Brijesh Kachalia

unread,
Jun 21, 2013, 12:50:14 PM6/21/13
to wr...@googlegroups.com
I have used below svn project.



However it gives me all sort of dependencies error i resolved by changing version & adding reporsitories at the end i got stuck up with downloading below ( error descriptiuon is given below)

[ERROR] Failed to execute goal on project wro4j-demo: Could not resolve dependencies for project ro.isdc.wro4j:wro4j-demo:war:1.5.1-SNAPSHOT: Could not find artifact ro.isdc.wro4j:wro4j-core:jar:1.5.1
-SNAPSHOT in scriptEngines (http://scriptengines.googlecode.com/svn/m2-repo) -> [Help 1]

However good news is with googleClosure i am able to see compression, however one additional thing i found is for css grouping i always get empty i verified the path but still the reponse from the server side is empty string.

Thanks for the help

Regards,
Brijesh
Reply all
Reply to author
Forward
0 new messages