I'm encountering some issues while trying to integrate JAWR with the generator configuration for converting less into CSS post compile. When I attempt this, I consistently run into errors where it's looking for a jawr_generator.css file that I believe is supported in newer versions (if I understand the documentation correctly), yet I keep receiving a 404 error indicating that the file does not exist.
My current setup involves using Maven, Spring, and JAWR (as per project requirements, although I am aware that tools like Grunt can achieve similar results). I'm specifically avoiding modifying the Pom files during compilation as we require hot swapping without relying on IntelliJ's less plugin.
Based on my understanding, setting up JAWR, including less4j in the maven config along with JAWR, and changing the resource extension to .less should be sufficient. If anyone has any insights on what I might be overlooking, your input would be greatly appreciated.
Relevant parts of pom.xml (not explicitly defining the JAWR version here):
...
<dependency>
<groupId>com.github.sommeri</groupId>
<artifactId>less4j</artifactId>
<version>1.17.2</version>
</dependency>
...
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<configuration>
<sourceDirectory>ourSourceDirectoryPath</sourceDirectory>
<outputDirectory>targetPath/ourDirectory
</outputDirectory>
<includes>
<include>otherFileCompiledAtCompile.less</include>
</includes>
</configuration>
</plugin>
jawr.properties:
# fileName (note: sample data extracted from actual names)
jawr.js.bundle.bundleName.id=/bundles/fileName.js
jawr.js.bundle.bundleName.mappings=/path/js/fileName.js,/path/otherFileName.js
jawr.css.bundle.bundleName.id=/bundles/fileName.css
jawr.css.bundle.bundleName.mappings=/path/css/lib/fileName.less
I have replaced specific file names and paths for confidentiality reasons. While everything works fine when included in the pom file, attempting to dynamically compile less to css at runtime shows an issue in the web browser console debugger - the requested jawr_generator.css file cannot be found:
Failed to load resource: the server responded with a status of 404 (Not Found)
The jawr_generator.css file appears to be a part of JAWR itself and does not seem to exist or get compiled. I suspect there may be a missing configuration or property required to enable this feature. Any suggestions are welcome. Thank you for your assistance.