温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

wed前端开发中如何使用maven-help-plugin查看插件

发布时间:2021-09-23 14:52:53 来源:亿速云 阅读:138 作者:小新 栏目:开发技术

这篇文章主要介绍了wed前端开发中如何使用maven-help-plugin查看插件,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

  除了通过访问在线文档了解某个插件的详细信息外,还可以借助 maven-help-plugin 插件来获取插件的详细信息。比如,在 CMD 命令行窗口中运行如下命令。

  Mvn help:describe -Dplugin=org.apache.maven.plugins:maven-site-plugin:3.4 -Ddetail

  就可以查看到 maven-site-plugin 插件 3.4 版本的详细信息,内容很多,如下列出的是开始的几个基本信息。

  Name: Apache Maven Site Plugin

  Description: The Maven Site Plugin is a plugin that generates a site for the

  current project.

  Group Id: org.apache.maven.plugins

  Artifact Id: maven-site-plugin

  Version: 3.4

  Goal Prefix: site

  This plugin has 9 goals:

  site:attach-descriptor

  Description: Adds the site descriptor (site.xml) to the list of files to be

  installed/deployed.

  For Maven-2.x this is enabled by default only when the project has pom

  packaging since it will be used by modules inheriting, but this can be

  enabled for other projects packaging if needed.

  This default execution has been removed from the built-in lifecycle of

  Maven 3.x for pom-projects. Users that actually use those projects to

  provide a common site descriptor for sub modules will need to explicitly

  define this goal execution to restore the intended behavior.

  Implementation: org.apache.maven.plugins.site.SiteDescriptorAttachMojo

  Language: java

  Bound to phase: package

  Name: Apache Maven Site Plugin

  Description: The Maven Site Plugin is a plugin that generates a site for the

  current project.

  Group Id: org.apache.maven.plugins

  Artifact Id: maven-site-plugin

  Version: 3.4

  Goal Prefix: site

  This plugin has 9 goals:

  site:attach-descriptor

  Description: Adds the site descriptor (site.xml) to the list of files to be

  installed/deployed.

  For Maven-2.x this is enabled by default only when the project has pom

  packaging since it will be used by modules inheriting, but this can be

  enabled for other projects packaging if needed.

  This default execution has been removed from the built-in lifecycle of

  Maven 3.x for pom-projects. Users that actually use those projects to

  provide a common site descriptor for sub modules will need to explicitly

  define this goal execution to restore the intended behavior.

  Implementation: org.apache.maven.plugins.site.SiteDescriptorAttachMojo

  Language: java

  Bound to phase: package

  当然,如果不想查看太多,只是想具体了解插件的某个目标,可以用 -Dgoal=目标的方式查看指定目标的信息,比如运行如下命令,可以查看 site 插件的 site 目标信息。

  Mvn help:describe -Dplugin=site -Dgoal=site -Ddetail

  输出信息:

  [INFO] Mojo: 'site:site'

  site:site

  Description: Generates the site for a single project.

  Note that links between module sites in a multi module build will not work,

  since local build directory structure doesn't match deployed site.

  Implementation: org.apache.maven.plugins.site.render.SiteMojo

  Language: java

  Available parameters:

  attributes

  Additional template properties for rendering the site. See Doxia Site

  Renderer.

  generatedSiteDirectory (Default: ${project.build.directory}/generated-site)

  Directory containing generated documentation. This is used to pick up

  other source docs that might have been generated at build time.

  generateProjectInfo (Default: true)

  User property: generateProjectInfo

  Whether to generate the summary page for project reports:

  project-info.html.

  generateReports (Default: true)

  User property: generateReports

  Convenience parameter that allows you to disable report generation.

  generateSitemap (Default: false)

  User property: generateSitemap

  Generate a sitemap. The result will be a 'sitemap.html' file at the site

  root.

  inputEncoding (Default: ${project.build.sourceEncoding})

  User property: encoding

  Specifies the input encoding.

  locales (Default: en)

  User property: locales

  A comma separated list of locales to render. The first valid token will

  be the default Locale for this site.

  moduleExcludes

  Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files

  ending in '-m1.fml' recursively)

  The configuration looks like this:

  filename1.ext,**/*sample.ext

  changes.xml,navigation.xml

  outputDirectory (Default: ${project.reporting.outputDirectory})

  User property: siteOutputDirectory

  Directory where the project sites and report distributions will be

  generated.

  outputEncoding (Default: ${project.reporting.outputEncoding})

  User property: outputEncoding

  Specifies the output encoding.

  relativizeDecorationLinks (Default: true)

  User property: relativizeDecorationLinks

  Make links in the site descriptor relative to the project URL. By

  default, any absolute links that appear in the site descriptor, e.g.

  banner hrefs, breadcrumbs, menu links, etc., will be made relative to

  project.url.

  Links will not be changed if this is set to false, or if the project has

  no URL defined.

  saveProcessedContent

  Whether to save Velocity processed Doxia content (*..vm) to

  ${generatedSiteDirectory}/processed.

  siteDirectory (Default: ${basedir}/src/site)

  Directory containing the site.xml file and the source for hand written

  docs (one directory per Doxia-source-supported markup types): see Doxia

  Markup Languages References).

  skip (Default: false)

  User property: maven.site.skip

  Set this to 'true' to skip site generation and staging.

  templateFile

  User property: templateFile

  The location of a Velocity template file to use. When used, skins and the

  default templates, CSS and images are disabled. It is highly recommended

  that you package this as a skin instead.

  validate (Default: false)

  User property: validate

  Whether to validate xml input documents. If set to true, all input

  documents in xml format (in particular xdoc and fml) will be validated

  and any error will lead to a build failure.

  xdocDirectory (Default: ${basedir}/xdocs)

  Alternative directory for xdoc source, useful for m1 to m2 migration

  Deprecated. use the standard m2 directory layout

  命令中的 -Dplugin=site 通过插件的前缀来指定要查看的插件名称,与写成 -Dplugin=org.apache.maven.plugins:maven-site-plugin:3.6 是一样的意思。

  -Dgoal=site,指定要查看的目标,名称是 site。

  -Ddetail,表示要查看详细信息。

感谢你能够认真阅读完这篇文章,希望小编分享的“wed前端开发中如何使用maven-help-plugin查看插件”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

wed
AI