使用 ThemeRoller 生成的 Primefaces CSS 主题的 Maven 重写过滤器

发布于 2024-11-15 07:27:59 字数 473 浏览 8 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪我入戏太深 2024-11-22 07:27:59

您可能需要查看 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文