poseidon-1.0.1.war is not equal to tag/target/poseidon-1.0.1.war and deployment fails

Post Reply
Netinium
Posts: 9
Joined: 06 Jul 2017, 16:09

16 Aug 2017, 11:24

Hello,

the provided poseidon-1.0.1.war (from poseidon-1.0.1.zip) is not equal to the version in tag/target/poseidon-1.0.1.war when you build it using Maven.

When I deploy the provided poseidon-1.0.1.war on Weblogic 12.1.3.0 (I have to remove the WEB-INF/lib/javax.faces-2.2.8.jar) the demo application works.
When I build the poseidon-1.0.1.war using the tag/pom.xml (mvn install) and I deploy the tag/target/poseidon-1.0.1.war on Weblogic the demo application fails:

Code: Select all

Error 500--Internal Server Error

javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-poseidon-turquoise" library
	at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:145)
	at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:77)
	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:826)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
When I compare the war contents I see only differences in the resource folders from:
- poseidon-1.0.1.zip\poseidon-1.0.1.war\resources\
- tag/target/poseidon-1.0.1.war \resources\

The /demo is the same in both
The /poseidon-layout folder is larger in size in the poseidon-1.0.1.zip\poseidon-1.0.1.war version (5.1MB versus 4.6MB)
The /primefaces-poseidon-***theme*** folders are larger in size in the poseidon-1.0.1.zip\poseidon-1.0.1.war version (127.751 bytes versus 55 bytes), No .css files in the tag/target/poseidon-1.0.1.war version. Because sass was not used in the mvn build?
The /sass is the same in both

How can I fix this?
Do I need to run the sass command manually?
As described a little bit in https://www.primefaces.org/poseidon/docs.xhtml?
How did you create the poseidon-1.0.1.zip\poseidon-1.0.1.war ?

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

18 Aug 2017, 09:18

In the end it was a similar problem as the question "Error in maven project Error loading css, cannot find "theme.css""

The demo pom.xml does not containsa maven sass plugin to make the css file generation part of the build.
Adding the following seems to work for me, it generates all css files using sass and the css files end up in the war file:

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>


Post Reply

Return to “Poseidon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest