Reputation: 11
I'm trying to get JAWR working with the generator configuration to convert less into CSS post compile but I keep getting errors when I try where it's trying to go to a jawr_generator.css file as this is supported (if I'm reading the documentation correctly) in newer versions but I'm getting a 404 doesn't exist.
I'm using maven, spring, and JAWR (project requirement, yes I know grunt and other things can do what we're doing but I need it using these technologies). I'm not wanting to do this at compile time with the Pom files either because we want hot swapping without using the less plugin for intelliJ.
From what I'm reading all you have to do is have JAWR set up, include the less4j in your maven config along with JAWR (JAWR is already functioning from a compile time configuration) and change the resource to .less at the directory you're pointing to, does anyone have any idea what I'm missing?
applicable parts of pom (version of JAWR is 1.7.0.1.1 if I'm not mistaken, it's just not defined in this POM explicitly):
...
<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 I've ripped out this from our actual names to make this generic)
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
Anyone have any ideas as to what I'm missing here? I've changed all the files and paths somewhat just for sanitization of data, it works fine when I put it in the pom. However if I try and get the resources to dynamically compile less to css at runtime it's saying this in the web browser developer tools debugger console and not showing the css file as being loaded:
Failed to http://ourUrl.com/path/jawr_generator.css?generationConfigParam=%2fpath%2fcss%2flib%2ffileName.less load resource: the server responded with a status of 404 (Not Found)
The jawr_generator.css isn't a file we use, it seems to be a part of JAWR itself and doesn't get compiled/exist. I'm assuming I'm missing a configuration or a property somewhere to enable this, anyone have any ideas? Thanks in advance for any help.
Upvotes: 0
Views: 286
Reputation: 11
We've resolved this, there was an issue with one of the paths where it was placing the file in a different directory than it was in the original file structure. Fixing this resolved the issue. The anltr conflict was a red herring. Closing as resolved.
Upvotes: 0