@Mojo(name="zip",
defaultPhase=PACKAGE,
requiresDependencyResolution=COMPILE)
public class ZipMojo
extends AbstractFabric8Mojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
deployFileGoal
The maven goal used to deploy aggregated zips.
|
protected String |
deployFileUrl
When deploying aggregated zips what URL should we deploy to.
|
protected boolean |
generateAppPropertiesFile
Whether or not we should generate a
fabric8.properties file from the pom.xml. |
protected boolean |
generateSummaryFile
Whether or not we should generate a
Summary.md file from the pom.xml <description> element text value. |
protected boolean |
includeReadMe
Whether or not we should upload the project readme file if no specific readme file exists in the
AbstractFabric8Mojo.appConfigDir |
protected String |
pathInZip
The name of the path inside the zip where the app is generated.
|
protected String |
replaceReadmeLinksPrefix
If provided then any links in the readme.md files will be replaced to include the given prefix
|
appConfigDir, combineDependencies, environmentVariableToAnnotationsFile, envPropertiesFile, ICON_EXTENSIONS, iconRef, kubernetesSourceJson, pureKubernetes, zipFilefailOnError, recreate, routeDomain| Constructor and Description |
|---|
ZipMojo() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendAppConfigFiles(File appSourceDir,
File outputDir)
Combines any files from the appSourceDir into the output directory
|
protected static void |
combineAppFilesToFolder(org.apache.maven.project.MavenProject reactorProject,
File buildDir,
org.apache.maven.plugin.logging.Log log,
String reactorProjectOutputPath) |
protected static void |
combinePropertiesFiles(File sourceFile,
File destFile)
For 2 properties files the source and dest file, lets combine the values so that all the values of the sourceFile are in the dest file
|
protected void |
createAggregatedZip(File projectBaseDir,
File projectBuildDir,
String reactorProjectOutputPath,
File projectOutputFile,
boolean includeReadMe,
Set<org.apache.maven.project.MavenProject> pomZipProjects) |
protected String |
escapeAgentPropertiesKey(String text) |
protected String |
escapeAgentPropertiesValue(String text) |
void |
execute() |
protected void |
generateAggregatedZip(org.apache.maven.project.MavenProject rootProject,
List<org.apache.maven.project.MavenProject> reactorProjects,
Set<org.apache.maven.project.MavenProject> pomZipProjects) |
protected void |
generateAggregatedZips() |
protected void |
generateZip() |
protected static String |
getChildProjectRelativePath(File projectBaseDir,
org.apache.maven.project.MavenProject pomProject) |
protected String |
replaceGithubLinks(Set<String> names,
String relativePath,
String line)
Replacing github links with fabric apps links for our quickstarts
|
addEnvironmentAnnotations, addEnvironmentAnnotations, addEnvironmentAnnotations, addPropertiesFileToMap, addPropertiesFileToMap, copyAppConfigFiles, copyIconToFolder, copyReadMe, copyReadMe, copyReadMe, copySummaryText, createClassLoader, createExceptionIterable, createURLClassLoader, findDocumentationUrl, findProjectDistributionManagement, getCompileClassLoader, getDockerImage, getEnvironmentVariableJsonSchema, getEnvironmentVariableProperties, getGitCommitId, getGitRepository, getKubernetesCombineJson, getKubernetesJson, getProject, getProjectAndFabric8Properties, getReplicas, getTestClassLoader, getZipFile, hasConfigDir, isIgnoreProject, isInCDBuild, isPom, isPomProject, loadJsonFile, loadPluginResource, overrideTemplateParameters, printSummary, replaceProperties, shouldGenerateForThisProject, toBeExclude, tryDefaultAnnotationEnvVar, unquoteTemplateExpression, warnIfInCDBuild, warnIfInCDBuildcreateController, findProjectConfig, getKubernetes, getNamespace, getNamespaceForEnvironment, getRootProject, getRootProjectFolder, getRouteDomain, isFailOnError, isRecreate, setFailOnError, setNamespace, setRecreate, setRouteDomain@Parameter(property="fabric8.includeReadMe",
defaultValue="true")
protected boolean includeReadMe
AbstractFabric8Mojo.appConfigDir@Parameter(property="fabric8.replaceReadmeLinksPrefix") protected String replaceReadmeLinksPrefix
@Parameter(property="fabric8.generateSummaryFile",
defaultValue="true")
protected boolean generateSummaryFile
Summary.md file from the pom.xml <description> element text value.@Parameter(property="fabric8.generateAppPropertiesFile",
defaultValue="true")
protected boolean generateAppPropertiesFile
fabric8.properties file from the pom.xml.@Parameter(property="fabric8.pathInZip",
defaultValue="${project.artifactId}")
protected String pathInZip
@Parameter(property="fabric8.deployFileGoal",
defaultValue="gpg:sign-and-deploy-file")
protected String deployFileGoal
deploy:deploy-file to perform a regular deploy
or gpg:sign-and-deploy-file to sign and deploy the file@Parameter(property="fabric8.deployFileUrl") protected String deployFileUrl
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void generateZip()
throws org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException,
org.apache.maven.plugin.MojoExecutionException,
IOException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.shared.dependency.tree.DependencyTreeBuilderExceptionorg.apache.maven.plugin.MojoExecutionExceptionIOExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void generateAggregatedZips()
throws IOException,
org.apache.maven.plugin.MojoExecutionException
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionprotected void generateAggregatedZip(org.apache.maven.project.MavenProject rootProject,
List<org.apache.maven.project.MavenProject> reactorProjects,
Set<org.apache.maven.project.MavenProject> pomZipProjects)
throws IOException,
org.apache.maven.plugin.MojoExecutionException
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionprotected String replaceGithubLinks(Set<String> names, String relativePath, String line)
protected void createAggregatedZip(File projectBaseDir, File projectBuildDir, String reactorProjectOutputPath, File projectOutputFile, boolean includeReadMe, Set<org.apache.maven.project.MavenProject> pomZipProjects) throws IOException
IOExceptionprotected static String getChildProjectRelativePath(File projectBaseDir, org.apache.maven.project.MavenProject pomProject) throws IOException
IOExceptionpublic static void appendAppConfigFiles(File appSourceDir, File outputDir) throws IOException
IOExceptionprotected static void combineAppFilesToFolder(org.apache.maven.project.MavenProject reactorProject,
File buildDir,
org.apache.maven.plugin.logging.Log log,
String reactorProjectOutputPath)
throws IOException
IOExceptionprotected static void combinePropertiesFiles(File sourceFile, File destFile) throws IOException
IOExceptionCopyright © 2011–2016 Red Hat. All rights reserved.