gpt4 book ai didi

java - 在 richfaces 中使用自定义 skin.properties 文件时无法找到 skinning.css 和 packed.css

转载 作者:行者123 更新时间:2023-11-30 11:37:08 26 4
gpt4 key购买 nike

如果我在 web.xml 中使用 myskin 而不是 blueSky,则有两个 css 文件未加载(skinning.css 和 packed.css),我的日志显示:

 1. WARNING JSF1064: Unable to find or serve resource,
org.richfaces.staticResource/4.2.0.Final/Packed/mysking/skinning.css.
2. WARNING JSF1064: Unable to find or serve resource,
org.richfaces.staticResource/4.2.0.Final/Packed/mysking/packed/packed.css.

谁能帮我解决上面的问题?

最佳答案

您需要“手动”创建这些文件。

我最近写了一篇关于这个的博文,check it out .

编辑:在您的情况下,您需要将其添加到 pom.xml

<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-richfaces-resources-plugin</artifactId>
<version>4.2.0.Final</version>
<configuration>
<skins>
<skin>mysking</skin>
</skins>
<excludedFiles>
<exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
<exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
</excludedFiles>
<includedContentTypes>
<include>text/css</include>
<include>image/.+</include>
</includedContentTypes>
<fileNameMappings>
<property>
<name>^.*showcase.*/([^/]+\.css)$</name>
<value>org.richfaces.showcase.css/$1</value>
</property>
<property>
<name>^.+/([^/]+\.(png|gif|jpg))$</name>
<value>org.richfaces.images/$1</value>
</property>
<property>
<name>^.+/([^/]+\.css)$</name>
<value>org.richfaces.css/$1</value>
</property>
</fileNameMappings>
</configuration>
<executions>
<execution>
<id>process-resources</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<staticResourceMappingFile>${project.build.outputDirectory}/META-INF/richfaces/packed-resource-mappings.properties</staticResourceMappingFile>

<resourcesOutputDir>${project.build.outputDirectory}/META-INF/resources/org.richfaces.staticResource/4.2.0.Final/Packed/</resourcesOutputDir>
<staticResourcePrefix>org.richfaces.staticResource/4.2.0.Final/Packed</staticResourcePrefix>

<pack>true</pack>
<compress>false</compress>

<excludedFiles>
<exclude>^javax.faces</exclude>
<exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
<exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
<exclude>^jquery\.js$</exclude>
</excludedFiles>

</configuration>
</execution>
</executions>
</plugin>

关于java - 在 richfaces 中使用自定义 skin.properties 文件时无法找到 skinning.css 和 packed.css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14195404/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com