修饰符和类型 | 字段和说明 |
---|---|
static Locale |
DEFAULT_LOCALE
Maven 站点的默认语言环境
|
修饰符和类型 | 方法及说明 |
---|---|
DecorationModel |
getDecorationModel(File siteDirectory,
Locale locale,
MavenProject project,
List<MavenProject> reactorProjects,
ArtifactRepository localRepository,
List<ArtifactRepository> repositories)
获取项目的装饰模型。
|
Artifact |
getDefaultSkinArtifact(ArtifactRepository localRepository,
List<ArtifactRepository> remoteArtifactRepositories)
从存储库之一获取项目的默认皮肤工件。
|
String |
getInterpolatedSiteDescriptorContent(Map<String,String> props,
MavenProject aProject,
String siteDescriptorContent)
在站点描述符内容中插入多个表达式。
|
MavenProject |
getParentProject(MavenProject aProject,
List<MavenProject> reactorProjects,
ArtifactRepository localRepository)
返回带有插值 URL 的父 POM。
|
String |
getRelativePath(String to,
String from)
计算两个 URL 之间或两个文件之间的相对路径。
|
File |
getSiteDescriptor(File siteDirectory,
Locale locale)
从项目的站点目录中获取站点描述符。
|
List<Locale> |
getSiteLocales(String locales)
site-tool
从逗号分隔列表中提取资源包中可用的语言环境。 |
Artifact |
getSkinArtifactFromRepository(ArtifactRepository localRepository,
List<ArtifactRepository> remoteArtifactRepositories,
DecorationModel decoration)
从其中一个存储库中获取皮肤工件。
|
void |
populateReportsMenu(DecorationModel decorationModel,
Locale locale,
Map<String,List<MavenReport>> reportsPerCategory)
填充装饰模型的预定义
reports 菜单,如果通过<menu ref="reports"/> . |
static final Locale DEFAULT_LOCALE
Locale.ENGLISH
Artifact getSkinArtifactFromRepository(ArtifactRepository localRepository, List<ArtifactRepository> remoteArtifactRepositories, DecorationModel decoration) throws SiteToolException
localRepository
- Maven 本地存储库,不为空。remoteArtifactRepositories
- Maven 远程存储库,不为空。decoration
- Doxia 站点描述符模型,不为空。Skin
工件DecorationModel
SiteToolException
- 如果有的话Artifact getDefaultSkinArtifact(ArtifactRepository localRepository, List<ArtifactRepository> remoteArtifactRepositories) throws SiteToolException
localRepository
- Maven 本地存储库,不为空。remoteArtifactRepositories
- Maven 远程存储库,不为空。Skin
来自给定项目和本地存储库的默认工件SiteToolException
- 如果有的话Skin.getDefaultSkin()
,
getSkinArtifactFromRepository(ArtifactRepository, List, DecorationModel)
File getSiteDescriptor(File siteDirectory, Locale locale)
siteDirectory
- 站点目录,不为空locale
- 站点描述符所需的语言环境。如果不为空,则搜索
,否则搜索。site_localeLanguage.xml
site.xml
String getInterpolatedSiteDescriptorContent(Map<String,String> props, MavenProject aProject, String siteDescriptorContent) throws SiteToolException
encoding
.
例如:
<项目>
<名称>我的项目名称</名称>
</项目>
<properties>
<my.value>你好</my.value>
</properties>
props
- 用于插值的地图,不为空。aProject
- 一个 Maven 项目,不为空。siteDescriptorContent
- 站点描述符文件,不为空。SiteToolException
- 如果在插值过程中发生错误。DecorationModel getDecorationModel(File siteDirectory, Locale locale, MavenProject project, List<MavenProject> reactorProjects, ArtifactRepository localRepository, List<ArtifactRepository> repositories) throws SiteToolException
siteDirectory
- 站点目录,如果项目来自存储库,则可能为空locale
- 用于装饰模型中 i18n 的语言环境。如果为 null,则使用 jvm 中的默认语言环境。project
- Maven 项目,不为空。reactorProjects
- Maven 反应器项目,不为空。localRepository
- Maven 本地存储库,不为空。repositories
- Maven 远程存储库,不为空。DecorationModel
的文件对应的对象。site.xml
SiteToolException
- 如果有的话void populateReportsMenu(DecorationModel decorationModel, Locale locale, Map<String,List<MavenReport>> reportsPerCategory)
reports
菜单,如果通过<menu ref="reports"/>
. 请注意,此菜单参考被翻译成 2 个单独的菜单:“项目信息”和“项目报告”。decorationModel
- Doxia Sitetools 装饰模型,不为空。locale
- 用于装饰模型中 i18n 的语言环境。如果为 null,则使用 jvm 中的默认语言环境。reportsPerCategory
- 每个类别的报告放在“报告”或“信息”菜单中,不为空。MavenReport.CATEGORY_PROJECT_INFORMATION
,
MavenReport.CATEGORY_PROJECT_REPORTS
List<Locale> getSiteLocales(String locales)
site-tool
从逗号分隔列表中提取资源包中可用的语言环境。请注意,该default
值将更改为 JVM 的默认语言环境。locales
- 以逗号分隔的语言环境列表Locale
,其中至少包含 Maven 默认语言环境,即英语String getRelativePath(String to, String from)
dav:https://dav.codehaus.org/
或
scm:svn:https://svn.apache.org/repos/asf
.to
-to
文件的 url 作为字符串from
-from
文件的 url 作为字符串from
从到的相对路径to
。MavenProject getParentProject(MavenProject aProject, List<MavenProject> reactorProjects, ArtifactRepository localRepository)
project.getParent()
已插入的 。reactorProjects
但是,当从 Maven 2 调用时,如果可用(内插反应器环境模型属性),或者如果反应器不可用(-N)
,则尝试从
参数中获取该project.getParent().getUrl()
值,该值将不会被内插。aProject
- 一个 Maven 项目,不为空。reactorProjects
- Maven 反应器项目,不为空。localRepository
- Maven 本地存储库,不为空。版权所有 © 2005–2022 Apache 软件基金会。版权所有。