The JAWR generator is having trouble locating the jawr_generator.css file when using Less to compile it

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.

Answer №1

After investigating, we discovered that the problem stemmed from an error in the file path where it was saving the file to a different directory than what was specified in the original structure. By correcting this, the issue was completely resolved. It turns out the mentioned Antlr conflict was not actually related and led us down the wrong path. Consider this matter closed.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with Bootstrap columns being misaligned on mobile devices

On my website, I've implemented a Bootstrap Grid design with three columns under the container-fluid BS attribute, along with .row .no-gutters. While the boxes are perfectly aligned in the desktop view, they stack vertically on mobile and tablet devi ...

Increase the spacing between accordion panels on a webforms ASP.NET application

Tech: This webpage is built on an Asp.net Webforms application using a master page and an ajax accordion control. All elements for the page are contained within a designated placeholder. The design of the webpage includes an ajax accordion with multiple A ...

unable to view bootstrap navigation bar

I can't seem to get my Bootstrap application page in rails with postgresql and turbolinks disabled to work properly. I've tried everything but still can't figure out what's wrong. <!DOCTYPE html> <html> <head> <ti ...

When a CSS fluid layout includes a containing div with margin or padding, it may lead to

On my jsfiddle , the outermost wrapper div has a width of 100%. I am trying to create an inner div (tb_margin or tb_padding) where the content starts 40px from the left. I have attempted to use both margin and padding for this left spacing, but in both cas ...

Bootstrap along with ROR 3.2.21 has a malfunctioning navbar

I am facing an issue with the Home section in the navbar. It used to work perfectly, but suddenly it stopped displaying as intended. I have checked and confirmed that both boostrap.min.js and boostrap.min.css are loaded properly. I have included boo ...

Having trouble aligning the form in the center?

Despite #container being centered, I am struggling to center the <form>. It is important for me to have all elements inside the form aligned horizontally and despite trying various techniques, it is not working as expected. <!-- Container Start - ...

Add an inset box shadow to the image tag

I'm attempting to achieve an embossed effect on an image, similar to a polaroid. I want a box-shadow on the top and left edges insetted to the picture. However, I'm having trouble getting it to work. Could this be a browser issue? I've crea ...

Tips for utilizing FixedHeaderTable - Basic instructions required

After doing extensive research, I stumbled upon this plugin called Fixed Header Tables. Despite following the instructions provided on the main website, I couldn't get it to work. I was aiming to create a table with a fixed top row and left column fu ...

Adjust the size of a nested div with varying height

Hey there! I'm facing an issue with a main div that contains 2 other divs. I need the height of the lower div to change dynamically based on the resize of the main div. Here's the code I have so far: <html> <head> <meta http- ...

Align the input labels to the right

In the demonstration below, an example is provided for aligning labels to the right of an input field. Is there a way to ensure that the input field takes up 100% of the width? Additionally, can an input be replaced with a textarea or another div element w ...

Is there a way to retrieve all CSS styles associated with a specific element?

When I come across a site element that I really like and want to incorporate into my own site, what is a simple way to do so? It can be challenging to navigate through numerous CSS files to find all the necessary styles. ...

Eliminating boundaries of a button component

Recently, I noticed an issue with a button on my website: https://i.sstatic.net/5S6fS.png The button has the following custom styling applied to it: const SubmitButton = styled.button` width: 275px; height: 30px; background-color: red; ...

Customize Color of Bootstrap Tooltips

Is there a way to customize the appearance of BootStrap tooltips by changing the color and aligning the text to the left? I've tried various CSS modifications from different posts, but none seem to work. Any idea on how to alter the CSS of the tooltip ...

Creating a unique custom theme for Twitter Bootstrap at 1200px and 980px screen sizes

Using the Twitter Bootstrap CSS framework, I have successfully created a custom navigation bar for desktop devices with a width of 1200 pixels and above. Now, I want to create similar navigation bars for other screen widths such as 980px, tablets, and phon ...

Make sure to maintain the hover effect even after clicking

How can I make my div retain the hover effect even after clicking on it? Here is the code snippet: #work_btn{ position:absolute; top:60%; left:60px; color:grey; background: -webkit-linear-gradient(0deg, #ff956c, #ff3644); -webkit-background-clip: text ...

Steps for making a dynamic number animation

Is there a way to create dynamic number changes when the user stops on a page using HTML, CSS, and JavaScript? I'd like the numbers to change as the user scrolls through the page until they come to a stop. I want the numbers to update quickly while t ...

Conceal a Tag with CSS

Looking to conceal a label using CSS <p class="half_form "> <label for="property_bathrooms">Bathrooms (*only numbers)</label> <input type="text" id="property_bathrooms" size="40" class= ...

The AddThis counter is missing the right border when integrated with Twitter's Bootstrap 3

When implementing the standard code provided by alongside Twitter's Bootstrap 3, I noticed that the right border of the counter is not displaying: ...

Offset the content from the border within a container that includes a scrollbar

The containing element has some content that is set to have a fixed height and overflow: auto; as shown in the JSFiddle link provided. When scrolling through the text, you will notice that the border comes into contact with the text both above and below. ...

What's the technique for displaying a distinct value (label) in the filter dropdown as opposed to in the column itself?

Is there a way to display different values in a dropdown filter for a factor column in a DataTable? I would like to have HTML rendering within the column, but show a different label when filtering. I tried using factor labels without success. I plan to use ...