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

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
ocriosb
Posts: 1
Joined: 12 Mar 2017, 07:30

31 Jul 2017, 05:18

Hello, when I run maven project appear the Error loading css, cannot find "theme.css". Can you help me, please.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

31 Jul 2017, 07:48

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

Netinium
Posts: 23
Joined: 06 Jul 2017, 16:09

16 Aug 2017, 12:00

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>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Aug 2017, 10:51

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.

Netinium
Posts: 23
Joined: 06 Jul 2017, 16:09

18 Aug 2017, 11:12

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.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

18 Aug 2017, 13:01

Yes, I agree with you. We will pay attention to this issue when preparing the documentation. Thank you so much!

Post Reply

Return to “Poseidon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests