Page 1 of 1

Error in maven project Error loading css, cannot find "theme.css"

Posted: 31 Jul 2017, 05:18
by ocriosb
Hello, when I run maven project appear the Error loading css, cannot find "theme.css". Can you help me, please.

Re: Error in maven project Error loading css, cannot find "theme.css"

Posted: 31 Jul 2017, 07:48
by aragorn
If you don't use theme.jar in your project, you need to provide css file from *.sass files. Please try;

Code: Select all

sass -w src/main/webapp/resources/ --sourcemap=none
Docs;
https://www.primefaces.org/poseidon/docs.xhtml

Re: Error in maven project Error loading css, cannot find "theme.css"

Posted: 16 Aug 2017, 12:00
by Netinium
I think it would be better if the demo pom.xml contains a maven sass plugin to make the css file generation part of the build.
Example which seems to work for me:

Code: Select all

<plugin>
            <groupId>nl.geodienstencentrum.maven</groupId>
            <artifactId>sass-maven-plugin</artifactId>
            <version>2.25</version>
            <executions>
                <execution>
                    <id>lint</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>scss-lint</goal>
                    </goals>
                </execution>
                <execution>
                    <id>build</id>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>update-stylesheets</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <sassSourceDirectory>
                    ${project.basedir}/src/main/webapp/resources
                </sassSourceDirectory>
                <destination>
                    ${project.basedir}/target/${project.build.finalName}/resources
                </destination>
            </configuration>
        </plugin>

Re: Error in maven project Error loading css, cannot find "theme.css"

Posted: 18 Aug 2017, 10:51
by aragorn
We tried it for Icarus layout. I think it is very slow to provide css files from scss files. It affected our production very much. I think it'll affect users, too. If they want to customize layout/theme according to themselves, they'll lose a lot of time. Therefore, you can add it into your project.

Re: Error in maven project Error loading css, cannot find "theme.css"

Posted: 18 Aug 2017, 11:12
by Netinium
Perhaps the documentation could be improved to warn that when building the example war yourself you need to perform the sass command at least once.

Re: Error in maven project Error loading css, cannot find "theme.css"

Posted: 18 Aug 2017, 13:01
by aragorn
Yes, I agree with you. We will pay attention to this issue when preparing the documentation. Thank you so much!