lThe runtime approach works in a similar fashion as the build-time (maven plugin).
When you create a request with the following uri: /wro/groupName.css
wro4j will extract the name of the group and its type. For instance, in above example the extracted group name is called groupName, and the type of the resource is css.
The group name is important for lookup inside the wroModel (defined by default in wro.xml, but can be also defined programmatically or using a different DSL). Each group defines a collection of resources which will be merged and processed.
As long as your model contains a group which refers the less resources located at whatever location, the outcome should be as expected.
For instance, your model can look like this (Groovy DSL):
groups {
groupName {
//classpath less resources
css("classpath:toserve/css/**.less");
//webapp context relative resources
css("/path/to/**.less");
//resources inside the WEB-INF folder
css("/WEB-INF/protected/**.less");
}
}
When used, LessCssProcessor is invoked for all resource of type css.
You must be aware that this can have bad impact on performance, since the Rhino is used to interpret js.
One option to improve the processing time, is to apply the processor only on resources having a certain extension (ex: *.less). This can be achieved using a decorator (see ExtensionsAwareProcessorDecorator).
Let me know if you need more help.
Cheers,
Alex