简体   繁体   English

在Maven POM的描述中是否可以包含格式(即HTML)?

[英]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.

相关问题 Android以编程方式包含布局(即没有XML) - Android programmatically include layout (i.e. without XML) 如何包含具有无效/过时 POM 的 maven package? - How do I include a maven package that has invalid/outdated POM? Maven Java API:独立依赖性解析(即不是Maven插件) - Maven Java API : Standalone Dependency Resolution (i.e. not a Maven plugin) Maven:对 pom 模块的依赖不包括其中的子模块 - Maven: Dependency to pom module is not include submodules from it Maven-ear-plugin - 不包括多个模块,即罐子,战争等 - Maven-ear-plugin - excluding multiple modules i.e. jars, wars etc 执行Maven命令时发生异常,即mvn install - Exception occurs while executing maven command i.e. mvn install 如何在本地安装项目的标记版本(即不是快照)而不是 maven 中心? - How to install a tagged version (i.e. not a snapshot) of your project locally and not to the maven central? 查看导入列表后,如何确定要在POM中包含哪些Maven工件? - How do I figure out what maven artifacts to include in my POM after looking at the list of imports? 如何在我的Maven pom中包含apache-cxf作为依赖项? - How can I include apache-cxf as a dependency in my Maven pom? 对于MySQL和Java而言,没有文件(即在内存中)的“加载数据”是可能的吗? - Is a “Load DATA” without a file (i.e., in memory) possible for MySQL and Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM