如果我在我的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.
有人可以帮我解决上述问题吗?
答案 0 :(得分:1)
您需要“手动”创建这些文件。
我最近写了一篇关于此事的博文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>