-
Notifications
You must be signed in to change notification settings - Fork 2
Use Less4jProcessor & enable non m2eclipse incremental build support #1
Conversation
Thanks for the PR, alexo. But I am having a hard time understanding why you took the time to do it. This is just a demo project for jbosstools/m2e-wro4j#17. Or should I understand the PR as a "this is how you should do it"? |
You mentioned in one of the issue description that plugin takes "forever". I just have changed the LessCss processor with Less4jProcessor to make it run faster and enabled a new feature which you could benefit from. Hopefully this will solve your problem. But I need some feeback. Also, I have tried using ConfigurableWroManagerFactory in a separate branch but have found an issue which will be fixed in next release. |
I have switched to the Less4j processor which runs perfectly now. Thanks a million!! I have not noticed any further differences when using incrementalBuildEnabled. I will start using it when I notice unnecessary builds being executed. I am not a big fan of ConfigurableWroManagerFactory for two reasons: If I understand correctly I would have to introduce a wro4j dependency into my webapp for de.evosec.wro4j.spi.DefaultConfigurableProvider. Also I would have to use two additional property files which I believe to be unnecessary. Speaking of unnecessary files: I would love to get rid of wro.xml and just use a configuration in my pom. Thanks a million for your help and keep up the great work! |
Use Less4jProcessor & enable non m2eclipse incremental build support
The incrementalBuildEnabled is useful when invoking maven plugin from the console. As result, the plugin won't process anything on subsequent execution unless the content is changed. I prefer and recommend using ConfigurableWroManagerFactory because it allows you to configure wro4j in a non invasive way. All you have to do, is to update the configuration file (wro.properties) with aliases of various implementation to be considered during execution. The aliases are picked up dynamically from the classpath, so it is easy to create and use custom implementations of processors, locators, models, namingStrategy, cacheStrategy, etc... The custom ConfigurableProvider doesn't have to be inside the webapp. It can be part of the jar holding other wro4j customizations (processors, namingStrategy, etc). Also, you don't need two additional property files, but only one (wro.properties). Getting rid of wro.xml is possible. It is being loaded by XmlModelFactory which is used as default WroModelFactory. To load model from a custom location or from a custom DSL, extend WroModelFactory and configure wro4j to use your custom model. Thanks for your feedback, |
Actually incrementalBuildEnabled also affects my Eclipse. When I delete the created css file and add a newline to the less file no new css file is created. If I set incrementalBuildEnabled to false this works. I will look into using the ConfigurableWroManagerFactory when the bug fix is released. This actually does sound very interesting! Thanks for the hints. I might look into this. |
Could you open an issue and describe the reproduction path? |
Yes, of course. |
I have created an issue: alexo/wro4j#153 |
No description provided.