首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在richfaces中使用自定义skin.properties文件时找不到skinning.css和packed.css

在richfaces中使用自定义skin.properties文件时找不到skinning.css和packed.css
EN

Stack Overflow用户
提问于 2013-01-07 19:54:30
回答 1查看 1.4K关注 0票数 2

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

代码语言:javascript
运行
复制
 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.

有没有人能帮我解决上面的问题?

EN

回答 1

Stack Overflow用户

发布于 2013-01-08 18:02:04

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

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

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

代码语言:javascript
运行
复制
<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>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14195404

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档