public abstract class AbstractMultiEnvMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.shared.filtering.MavenResourcesFiltering |
mavenResourcesFiltering |
Constructor and Description |
---|
AbstractMultiEnvMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
createLoggingOutput(String[] identifiedEnvironments) |
protected File |
createPluginResourceOutput() |
protected File |
createUnpackDirectory()
Create the unpack directory for later unpacking of the main artifact.
|
protected void |
deleteDirectoryOfPreviousRunIfExist(File directoryOfPreviousRun) |
protected List<String> |
environmentNamesAreValid(String[] environmens)
This will check if an environment (directory) contains a space cause the environment will later being used as a
classifier which does not allow a space.
|
protected void |
filterResources(File outputDirectory) |
org.apache.maven.archiver.MavenArchiveConfiguration |
getArchive() |
protected String |
getArchiveExtensionOfTheArtifact(org.apache.maven.artifact.Artifact artifact) |
protected String |
getArchiveExtensionOfTheProjectMainArtifact() |
protected File |
getArchiveFile(File basedir,
String finalName,
String classifier,
String archiveExt)
Returns the archive file to generate, based on an optional classifier.
|
LinkedHashSet<String> |
getDelimiters() |
String |
getEncoding() |
String |
getEscapeString() |
List<String> |
getFilters() |
String |
getFinalName() |
org.apache.maven.project.MavenProject |
getMavenProject() |
org.apache.maven.execution.MavenSession |
getMavenSession() |
List<String> |
getNonFilteredFileExtensions() |
File |
getOutputDirectory() |
org.apache.maven.project.MavenProjectHelper |
getProjectHelper() |
File |
getSourceDirectory() |
protected String[] |
getTheEnvironments(File resourceResult) |
boolean |
isEscapeWindowsPaths() |
boolean |
isFileNameFiltering() |
boolean |
isIncludeEmptyDirs() |
boolean |
isSupportMultiLineFiltering() |
boolean |
isUseDefaultDelimiters() |
void |
setIncludeEmptyDirs(boolean includeEmptyDirs) |
protected void |
validateEnvironments(String[] identifiedEnvironments)
This will validate the environments and will fail the build in case of errors.
|
getLog, getPluginContext, setLog, setPluginContext
@Component(role=org.apache.maven.shared.filtering.MavenResourcesFiltering.class, hint="default") protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
public org.apache.maven.archiver.MavenArchiveConfiguration getArchive()
public org.apache.maven.project.MavenProject getMavenProject()
public org.apache.maven.execution.MavenSession getMavenSession()
public File getOutputDirectory()
public org.apache.maven.project.MavenProjectHelper getProjectHelper()
public File getSourceDirectory()
public String getFinalName()
public String getEncoding()
protected String[] getTheEnvironments(File resourceResult)
resourceResult
- The directory where to search for different environments.protected List<String> environmentNamesAreValid(String[] environmens)
environmens
- The environments which should be checked.empty
all environments are ok.protected File getArchiveFile(File basedir, String finalName, String classifier, String archiveExt)
basedir
- the output directoryfinalName
- the name of the ear fileclassifier
- an optional classifierpublic String getEscapeString()
public boolean isEscapeWindowsPaths()
public boolean isFileNameFiltering()
public LinkedHashSet<String> getDelimiters()
public boolean isUseDefaultDelimiters()
public boolean isSupportMultiLineFiltering()
protected void deleteDirectoryOfPreviousRunIfExist(File directoryOfPreviousRun) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected File createUnpackDirectory() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- in case of failures.org.apache.maven.plugin.MojoFailureException
protected String getArchiveExtensionOfTheProjectMainArtifact() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected String getArchiveExtensionOfTheArtifact(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected File createPluginResourceOutput() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public boolean isIncludeEmptyDirs()
public void setIncludeEmptyDirs(boolean includeEmptyDirs)
protected void filterResources(File outputDirectory) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void createLoggingOutput(String[] identifiedEnvironments)
protected void validateEnvironments(String[] identifiedEnvironments) throws org.apache.maven.plugin.MojoFailureException
identifiedEnvironments
- The environments which will be checked.org.apache.maven.plugin.MojoFailureException
- in case of invalid environments.Copyright © 2011–2017 SoftwareEntwicklung Beratung Schulung. All rights reserved.