[英]Is it possible to include formatting (i.e. HTML) in the description of a Maven POM?
I'd like to have useful urls and a bit of tidiness in the description and other text fields of my Maven generated site. 我想在我的Maven生成站点的描述和其他文本字段中添加有用的网址和一些整洁的内容。
Is there a way to do this? 有没有办法做到这一点?
If we are talking about maven-site-plugin
, you can customize your site by modifying the default template , which uses Velocity
as template engine, by specifying something like this: 如果我们谈论的是
maven-site-plugin
,则可以通过指定默认模板 (例如,使用Velocity
作为模板引擎)修改默认模板来自定义网站:
<configuration>
<templateFile>${basedir}/maven-site.vm</templateFile>
</configuration>
Reference documentation here . 参考文档在这里 。
Also, keep in mind from their documentation, this method has downsides. 另外,请记住,从他们的文档中可以看出,此方法有缺点。
Note: If you use this method then skins and the default templates, CSS and images are disabled.
注意:如果使用此方法,则将禁用皮肤和默认模板,CSS和图像。 It is therefor highly recommended that you package this as a skin instead.
因此,强烈建议您将其包装为皮肤 。
EDIT: You can add CDATA
tag to include more sofisticated description like so: 编辑:您可以添加
CDATA
标记以包括更复杂的描述,例如:
<description>
<![CDATA[
<p>This is a description including html tags and whatnot</p>
]]>
</description>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.