public class DocumentationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
createExtensionsIndex(List<String> extensionRepositories,
String extensionRepositoryOwner,
String documentationBaseDirectory,
String extensionsIndexFileName)
Generate a extension index file from the template file
|
static void |
deployMkdocsOnGitHubPages(String version,
File baseDirectory,
String url,
String scmUsername,
String scmPassword,
org.apache.maven.plugin.logging.Log logger)
Deploy the mkdocs website on GitHub pages
|
static void |
generateDocumentation(List<NamespaceMetaData> namespaceMetaDataList,
String documentationBaseDirectory,
String documentationVersion,
org.apache.maven.plugin.logging.Log logger)
Generate documentation related files using metadata
|
static boolean |
generateMkdocsSite(File mkdocsConfigFile,
org.apache.maven.plugin.logging.Log logger)
Build the mkdocs site using the mkdocs config file
|
static List<NamespaceMetaData> |
getExtensionMetaData(String targetDirectoryPath,
List<String> runtimeClasspathElements,
org.apache.maven.plugin.logging.Log logger)
Returns the extension extension meta data
Gets the meta data from the siddhi manager
|
static void |
removeSnapshotAPIDocs(File mkdocsConfigFile,
String documentationBaseDirectory,
org.apache.maven.plugin.logging.Log logger)
Remove the snapshot version documentation files from docs/api directory
|
static void |
updateAPIPagesInMkdocsConfig(File mkdocsConfigFile,
String documentationBaseDirectory)
This add a new page to the list of pages in the mkdocs configuration
|
static void |
updateDocumentationOnGitHub(String docsDirectory,
File mkdocsConfigFile,
File readmeFile,
String version,
org.apache.maven.plugin.logging.Log logger)
Commit the documentation directory and the mkdocs config file
|
static void |
updateHeadingsInMarkdownFile(File inputFile,
File outputFile,
String extensionRepositoryName,
String latestDocumentationVersion,
List<NamespaceMetaData> namespaceMetaDataList)
Update the documentation home page
|
public static List<NamespaceMetaData> getExtensionMetaData(String targetDirectoryPath, List<String> runtimeClasspathElements, org.apache.maven.plugin.logging.Log logger) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
targetDirectoryPath - The path of the target directory of the maven module containing extensionslogger - The maven plugin loggerorg.apache.maven.plugin.MojoFailureException - If this fails to access project dependenciesorg.apache.maven.plugin.MojoExecutionException - If the classes directory from which classes are loaded is invalidpublic static void generateDocumentation(List<NamespaceMetaData> namespaceMetaDataList, String documentationBaseDirectory, String documentationVersion, org.apache.maven.plugin.logging.Log logger) throws org.apache.maven.plugin.MojoFailureException
namespaceMetaDataList - Metadata in this repositorydocumentationBaseDirectory - The path of the directory in which the documentation will be generateddocumentationVersion - The version of the documentation being generatedlogger - The logger to log errorsorg.apache.maven.plugin.MojoFailureException - if the Mojo fails to find template file or create new documentation filepublic static void updateHeadingsInMarkdownFile(File inputFile, File outputFile, String extensionRepositoryName, String latestDocumentationVersion, List<NamespaceMetaData> namespaceMetaDataList) throws org.apache.maven.plugin.MojoFailureException
inputFile - The path to the input fileoutputFile - The path to the output fileextensionRepositoryName - The name of the extension repositorylatestDocumentationVersion - The version of the latest documentation generatednamespaceMetaDataList - Metadata in this repositoryorg.apache.maven.plugin.MojoFailureException - if the Mojo fails to find template file or create new documentation filepublic static void removeSnapshotAPIDocs(File mkdocsConfigFile, String documentationBaseDirectory, org.apache.maven.plugin.logging.Log logger)
mkdocsConfigFile - The mkdocs configuration filedocumentationBaseDirectory - The path of the base directory in which the documentation will be generatedlogger - The maven plugin loggerpublic static void updateAPIPagesInMkdocsConfig(File mkdocsConfigFile, String documentationBaseDirectory) throws FileNotFoundException
mkdocsConfigFile - The mkdocs configuration filedocumentationBaseDirectory - The base directory of the documentationFileNotFoundException - If mkdocs configuration file is not foundpublic static void createExtensionsIndex(List<String> extensionRepositories, String extensionRepositoryOwner, String documentationBaseDirectory, String extensionsIndexFileName) throws org.apache.maven.plugin.MojoFailureException
extensionRepositories - The list of extension repository namesextensionRepositoryOwner - The extension repository owner's namedocumentationBaseDirectory - The output directory path in which the extension index will be generatedextensionsIndexFileName - The name of the index file that will be generatedorg.apache.maven.plugin.MojoFailureException - if the Mojo fails to find template file or create new documentation filepublic static boolean generateMkdocsSite(File mkdocsConfigFile, org.apache.maven.plugin.logging.Log logger)
mkdocsConfigFile - The mkdocs configuration filelogger - The maven loggerpublic static void deployMkdocsOnGitHubPages(String version, File baseDirectory, String url, String scmUsername, String scmPassword, org.apache.maven.plugin.logging.Log logger)
version - The version of the documentationbaseDirectory - The base directory of the projecturl - The SCM URLscmUsername - The SCM usernamescmPassword - The SCM passwordlogger - The maven loggerpublic static void updateDocumentationOnGitHub(String docsDirectory, File mkdocsConfigFile, File readmeFile, String version, org.apache.maven.plugin.logging.Log logger)
docsDirectory - The docs drectorymkdocsConfigFile - The mkdocs configuration filereadmeFile - The read me fileversion - The version of the documentationlogger - The maven loggerCopyright © 2019 WSO2. All rights reserved.