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