使用 ThemeRoller 生成的 Primefaces CSS 主题的 Maven 重写过滤器
我正在使用 ThemRoller 为 PrimeFaces 创建自定义主题。每个主题都与一个 Maven 工件相关,并且该 jar 是使用 maven-resources-plugin
完美创建的。
主题是用这样的 URL 生成的:
url("images/ui-bg_highlight-hard.png")
要在 jar 中使用,必须将 url 重写为以下格式:
url("#{resource['primefaces-yourtheme:images/ui-bg_highlight-hard.png']}")
要直接查看主题(并修改它),最好将 css 保留为不带 #{}
在 src/main/resources
文件夹中。有没有办法应用 Maven 过滤器来自动重写 url?
I'm creating custom themes for PrimeFaces with ThemRoller. Each theme is related to a single maven artifact and the jar is created perfectly with the maven-resources-plugin
.
The theme is generated with URLs like this:
url("images/ui-bg_highlight-hard.png")
To be used in a jar, the url must be rewrittten into this format:
url("#{resource['primefaces-yourtheme:images/ui-bg_highlight-hard.png']}")
To directly see the theme (and modify it), it would be nicer to keep the css in the format without #{}
in the src/main/resources
folder. Is there a way to apply a maven filter to automatically rewrite the urls?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要查看 maven-replacer-plugin。
您应该能够使用正则表达式来插入加载 EL 的 JSF 资源。
You might want to take a look at the maven-replacer-plugin.
You should be able to use a regex to insert the JSF resource loading EL.