@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 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 String |
iconRef
Provides the resource name of the icon to use; found using the current classpath (including the ones shippped inside the maven plugin).
|
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
|
protected org.apache.maven.execution.MavenSession |
session
The Maven Session.
|
appConfigDir, kubernetesSourceJson, zipFile| 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 |
copyAppConfigFiles(File appBuildDir,
File appConfigDir)
Copies any local configuration files into the app directory
|
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
|
protected boolean |
toBeExclude(String fileName) |
createClassLoader, createURLClassLoader, getCompileClassLoader, getEnvironmentVariableJsonSchema, getEnvironmentVariableProperties, getKubernetesJson, getProject, getReplicas, getTestClassLoader, getZipFile, hasConfigDir, isIgnoreProject, isPom, isPomProject, loadPluginResource, shouldGenerateForThisProject@Parameter(property="fabric8.includeReadMe",
defaultValue="true")
protected boolean includeReadMe
AbstractFabric8Mojo.appConfigDir@Parameter(property="fabric8.replaceReadmeLinksPrefix") protected String replaceReadmeLinksPrefix
@Parameter(property="fabric8.iconRef") protected String iconRef
@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 fileprotected org.apache.maven.execution.MavenSession session
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
IOExceptionprotected void copyAppConfigFiles(File appBuildDir, File appConfigDir) throws IOException
IOExceptionprotected boolean toBeExclude(String fileName)
Copyright © 2011–2015 Red Hat. All rights reserved.