Class AbstractOsgiContainerPackMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- br.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo
-
- br.com.c8tech.tools.maven.plugin.osgi.container.AbstractOsgiContainerPackMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractOsgiDockerMojo,MojoCacheMavenArtifacts,MojoGenerateContainerConfigFile,MojoGenerateOsgiAssemblyArchive
public abstract class AbstractOsgiContainerPackMojo extends br.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo- Author:
- Cristiano Gavião
-
-
Field Summary
Fields Modifier and Type Field Description static StringDOWNLOAD_STATUSstatic StringEQUINOX_CONFIGURATION_NAMEstatic StringEQUINOX_CONFIGURATION_PATHstatic StringFELIX_CONFIGURATION_NAMEstatic StringFELIX_CONFIGURATION_PATHprotected static StringPROPERTY_CACHE_DIRprotected static StringPROPERTY_WORK_DIR
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOsgiContainerPackMojo(org.apache.maven.project.MavenProject project)protectedAbstractOsgiContainerPackMojo(org.apache.maven.project.MavenProject project, String... packagings)The default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMavenArtifactSet(br.com.c8tech.tools.maven.osgi.lib.mojo.beans.MavenArtifactSet pMavenArtifactSet)voidaddScope(String scope)protected PathcalculateContainerConfigurationFileOutputPath()protected voidcreateDefaultDirectories()protected voiddoBeforeSkipMojo()Used to specify any action that must be executed when the mojo are being skipped by maven reactor.protected voidexecuteExtraInitializationSteps()protected StringgetBaseContainerConfigurationFileUrl()org.apache.maven.artifact.resolver.filter.ArtifactFiltergetBundleValidArtifactFilter()PathgetCacheDirectory()FilegetConfiguratorInitialFile()protected ContainergetContainer()protected PathgetContainerCacheDirectory()protected StringgetContainerPomDependenciesGAV()protected PathgetContainerWorkDirectory()static String[]getDefaultSupportedPackagings()StringgetEncoding()protected List<String>getExcludedArtifacts()StringgetLocalRepositoryGAV()FilegetLogbackConfigurationFile()protected br.com.c8tech.tools.maven.osgi.lib.mojo.beans.MavenArtifactSetsgetMavenArtifactSets()static MessageFormatgetMsgChoiceArtifact()org.apache.maven.project.ProjectBuildergetProjectBuilder()protected Set<String>getScopes()protected booleanisOptionalConsidered()booleanisRunOnlyAtExecutionRoot()protected booleanisSkip()protected booleanisSkipConfigurationGen()protected booleanisTransitiveConsidered()static PropertiesloadProperties(URL pPropertiesFileURL, String pEncoding)protected voidsetBaseContainerConfigurationFileUrl(String pBaseContainerConfigurationFileUrl)voidsetConfiguratorInitialFile(File pConfiguratorInitialFile)protected voidsetContainerPomDependenciesGAV(String pContainerPomDependenciesGAV)voidsetEncoding(String pEncoding)voidsetLocalRepositoryGAV(String pLocalRepositoryGAV)voidsetLogbackConfigurationFile(File pLogbackConfigurationFile)voidsetScopes(List<String> scopes)protected voidsetSkipConfigurationGen(boolean pSkipConfigurationGen)-
Methods inherited from class br.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo
addExtraSupportedPackaging, cleanWorkDirectory, combineScopes, copyInternalFileToProjectDir, copyInternalFileToProjectDir, doInitialValidation, execute, executeMojo, getBasedir, getBuildDir, getCachedFileNamePattern, getCacheSubDirectory, getClassifier, getDependenciesHelper, getDirectoryHelper, getExtraSupportedPackagings, getFilterFactory, getFinalName, getGoalName, getLocalRepository, getMavenSession, getPluginDescriptor, getProject, getProjectHelper, getRemoteRepositories, getRepositorySystem, getRuntimeInformation, getSupportedPackagings, getWorkDirectory, getWorkSubDirectory, isAggregator, isVerbose, loadProject, loadProject, registerArtifactsIntoAggregatorBuildContext, setBuildDir, setClassifier, setExtraSupportedPackagings, setFinalName, setWorkDirectory
-
-
-
-
Field Detail
-
DOWNLOAD_STATUS
public static final String DOWNLOAD_STATUS
- See Also:
- Constant Field Values
-
EQUINOX_CONFIGURATION_NAME
public static final String EQUINOX_CONFIGURATION_NAME
- See Also:
- Constant Field Values
-
EQUINOX_CONFIGURATION_PATH
public static final String EQUINOX_CONFIGURATION_PATH
- See Also:
- Constant Field Values
-
FELIX_CONFIGURATION_NAME
public static final String FELIX_CONFIGURATION_NAME
- See Also:
- Constant Field Values
-
FELIX_CONFIGURATION_PATH
public static final String FELIX_CONFIGURATION_PATH
- See Also:
- Constant Field Values
-
PROPERTY_CACHE_DIR
protected static final String PROPERTY_CACHE_DIR
- See Also:
- Constant Field Values
-
PROPERTY_WORK_DIR
protected static final String PROPERTY_WORK_DIR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractOsgiContainerPackMojo
protected AbstractOsgiContainerPackMojo(org.apache.maven.project.MavenProject project)
-
AbstractOsgiContainerPackMojo
protected AbstractOsgiContainerPackMojo(org.apache.maven.project.MavenProject project, String... packagings)The default constructor.- Parameters:
project- the current project.packagings- the packagings supported by the plugin.
-
-
Method Detail
-
getDefaultSupportedPackagings
public static String[] getDefaultSupportedPackagings()
-
getMsgChoiceArtifact
public static MessageFormat getMsgChoiceArtifact()
-
loadProperties
public static Properties loadProperties(URL pPropertiesFileURL, String pEncoding) throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
addMavenArtifactSet
public final void addMavenArtifactSet(br.com.c8tech.tools.maven.osgi.lib.mojo.beans.MavenArtifactSet pMavenArtifactSet)
-
addScope
public final void addScope(String scope)
-
calculateContainerConfigurationFileOutputPath
protected final Path calculateContainerConfigurationFileOutputPath()
-
createDefaultDirectories
protected void createDefaultDirectories() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
createDefaultDirectoriesin classbr.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
doBeforeSkipMojo
protected void doBeforeSkipMojo() throws org.apache.maven.plugin.MojoExecutionExceptionUsed to specify any action that must be executed when the mojo are being skipped by maven reactor.- Specified by:
doBeforeSkipMojoin classbr.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- When the skipping process had any problem
-
executeExtraInitializationSteps
protected void executeExtraInitializationSteps() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executeExtraInitializationStepsin classbr.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getBaseContainerConfigurationFileUrl
protected String getBaseContainerConfigurationFileUrl()
-
getBundleValidArtifactFilter
public org.apache.maven.artifact.resolver.filter.ArtifactFilter getBundleValidArtifactFilter()
-
getCacheDirectory
public final Path getCacheDirectory()
- Specified by:
getCacheDirectoryin classbr.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo
-
getConfiguratorInitialFile
public File getConfiguratorInitialFile()
-
getContainer
protected final Container getContainer()
-
getContainerCacheDirectory
protected final Path getContainerCacheDirectory()
-
getContainerPomDependenciesGAV
protected String getContainerPomDependenciesGAV()
-
getContainerWorkDirectory
protected final Path getContainerWorkDirectory()
-
getEncoding
public String getEncoding()
-
getLocalRepositoryGAV
public String getLocalRepositoryGAV()
-
getLogbackConfigurationFile
public File getLogbackConfigurationFile()
-
getMavenArtifactSets
protected final br.com.c8tech.tools.maven.osgi.lib.mojo.beans.MavenArtifactSets getMavenArtifactSets()
-
getProjectBuilder
public org.apache.maven.project.ProjectBuilder getProjectBuilder()
-
isOptionalConsidered
protected final boolean isOptionalConsidered()
-
isRunOnlyAtExecutionRoot
public boolean isRunOnlyAtExecutionRoot()
-
isSkip
protected boolean isSkip()
- Specified by:
isSkipin classbr.com.c8tech.tools.maven.osgi.lib.mojo.AbstractCustomPackagingMojo
-
isSkipConfigurationGen
protected boolean isSkipConfigurationGen()
-
isTransitiveConsidered
protected final boolean isTransitiveConsidered()
-
setBaseContainerConfigurationFileUrl
protected void setBaseContainerConfigurationFileUrl(String pBaseContainerConfigurationFileUrl)
-
setConfiguratorInitialFile
public void setConfiguratorInitialFile(File pConfiguratorInitialFile)
-
setContainerPomDependenciesGAV
protected void setContainerPomDependenciesGAV(String pContainerPomDependenciesGAV)
-
setEncoding
public void setEncoding(String pEncoding)
-
setLocalRepositoryGAV
public void setLocalRepositoryGAV(String pLocalRepositoryGAV)
-
setLogbackConfigurationFile
public void setLogbackConfigurationFile(File pLogbackConfigurationFile)
-
setSkipConfigurationGen
protected void setSkipConfigurationGen(boolean pSkipConfigurationGen)
-
-