wro4j

Free and Open Source Java project which brings together almost all the modern web tools: JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression, Less, Sass, CoffeeScript and much more. In the same time, the aim is to keep it as simple as possible and as extensible as possible in order to be easily adapted to application specific needs.

Github stars Tracking Chart

Web Resource Optimizer for Java

Join the chat at https://gitter.im/wro4j/wro4j
Build Status
Coverage Status
Maven Central
Stories in Ready

wro4j is a free and Open Source Java project which will help you to easily improve your web application page loading time. It can help you to keep your static resources (js & css) well organized, merge & minify them at run-time (using a simple filter) or build-time (using maven plugin) and has a dozen of features you may find useful when dealing with web resources.

Getting Started

In order to get started with wro4j, you have to follow only 3 simple steps.

Step 1: Add WroFilter to 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>

Step 2: Create wro.xml

<groups xmlns="http://www.isdc.ro/wro">
	<group name="all">
		<css>/asset/*.css</css>
		<js>/asset/*.js</js>
	</group>
</groups> 		

Step 3: Use optimized resources

<html>
  <head>
	<title>Web Page using wro4j</title>
	<link rel="stylesheet" type="text/css" href="/wro/all.css" />
	<script type="text/javascript" src="/wro/all.js"/>
  </head>
<body>

</body>
</html>		

Documentation

The documentation for this project is located here

Issues

Found a bug? Report it to the issue tracker

Feedback

If you have any questions or suggestions, please feel free to post a comment to the discussion group

Follow me on Twitter.

License

This project is available under the Apache License, Version 2.0.

Main metrics

Overview
Name With Ownerwro4j/wro4j
Primary LanguageJava
Program languageJava (Language Count: 9)
Platform
License:Apache License 2.0
所有者活动
Created At2015-03-24 22:21:00
Pushed At2025-07-12 09:16:51
Last Commit At2024-10-30 21:34:18
Release Count56
Last Release Namev2.1.1 (Posted on )
First Release Namev1.2.0-rc1 (Posted on )
用户参与
Stargazers Count485
Watchers Count31
Fork Count108
Commits Count4.1k
Has Issues Enabled
Issues Count1098
Issue Open Count261
Pull Requests Count63
Pull Requests Open Count2
Pull Requests Close Count16
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private