Closed GoogleCodeExporter closed 9 years ago
Besides namingStrategy, the HashStrategy (former HashBuilder) is configurable
in a similar fashion:
hashStrategy=SHA-1
Possible values are: CRC32, MD5, SHA-1
Default value is SHA-1.
The possible values for NamingStrategy are: noOp, timestamp, hashEncoder-CRC32
Default value is noOp.
Original comment by alex.obj...@gmail.com
on 17 Jun 2012 at 7:01
Another feature implemented as part of this issue is simplified contribution of
NamingStrategy using one of the following:
1) Extending ConfigurableProviderSupport
2) Implementing NamingStrategyProvider interface
and declaring these as services in META-INF/services
Example:
1) Using ConfigurableProviderSupport:
- Create META-INF/services/ro.isdc.wro.util.provider.ConfigurableProvider
- Add the fully qualified name of the class implementing ConfigurableProvider interface or extending ConfigurableProviderSupport class.
2) Using NamingStrategyProvider interface:
- Create META-INF/services/ro.isdc.wro.model.resource.support.naming.NamingStrategyProvider
- Add the fully qualified name of the class implementing NamingStrategyProvider
The similar simplified contribution is available for HashStrategy. The only
difference is instead implementing NamingStrategyProvider, use
HashStrategyProvider:
- Create META-INF/services/ro.isdc.wro.model.resource.support.hash.HashStrategyProvider
- Add the fully qualified name of the class implementing HashStrategyProvider
Original comment by alex.obj...@gmail.com
on 17 Jun 2012 at 7:16
Issue 559 has been merged into this issue.
Original comment by alex.obj...@gmail.com
on 24 Sep 2012 at 8:45
Does this feature enable run-time naming strategy changes or is it only for
build-time? If it can be used at run-time, are there any configuration
examples to look at?
I tried adding a DefaultHashEncoderNamingStrategy and then my own custom naming
strategy, to the run-time configuration of WRO (see code below), but it had no
effect on the generated bundle names. Also, in my custom naming strategy
implementation, the rename() method was never called.
ConfigurableWroManagerFactory managerFactory = new
ConfigurableWroManagerFactory();
managerFactory.setNamingStrategy(new DefaultHashEncoderNamingStrategy());
Thanks for any assistance.
Original comment by devdanw...@gmail.com
on 5 Jun 2013 at 11:05
By default, only maven plugin uses namingStrategy. If you need it to work for
runtime solution, you should use something like
https://github.com/Orange-OpenSource/wro4j-taglib .
Original comment by alex.obj...@gmail.com
on 6 Jun 2013 at 7:45
Original issue reported on code.google.com by
alex.obj...@gmail.com
on 4 Jun 2012 at 1:12