net.sourceforge.osgi.deployment.maven.mojo
Class DeploymentPluginMojoContext
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.sourceforge.osgi.deployment.maven.mojo.DeploymentPluginMojoContext
- All Implemented Interfaces:
- IDeploymentPluginContext, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class DeploymentPluginMojoContext
- extends org.apache.maven.plugin.AbstractMojo
- implements IDeploymentPluginContext
Create an OSGi deployment package from Maven project.
- Author:
- Siamak Haschemi, haschemi@informatik.hu-berlin.de
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeploymentPluginMojoContext
public DeploymentPluginMojoContext()
execute
public final void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- This method will be called by the Maven framework in order to execute this plugin.
- Specified by:
execute in interface org.apache.maven.plugin.Mojo
- Throws:
org.apache.maven.plugin.MojoExecutionException - id any error occures
org.apache.maven.plugin.MojoFailureException - id any error occures
getLogger
public final org.apache.maven.plugin.logging.Log getLogger()
- Specified by:
getLogger in interface IDeploymentPluginContext
- Returns:
- the logger
- See Also:
IDeploymentPluginContext.getLogger()
getOutputDirectory
public final java.io.File getOutputDirectory()
- Specified by:
getOutputDirectory in interface IDeploymentPluginContext
- Returns:
- the outputDirectory
- See Also:
IDeploymentPluginContext.getOutputDirectory()
setOutputDirectory
public final void setOutputDirectory(java.io.File p_outputDirectory)
- Parameters:
p_outputDirectory - the outputDirectory to set
getBaseDir
public final java.io.File getBaseDir()
- Specified by:
getBaseDir in interface IDeploymentPluginContext
- Returns:
- the base directory
- See Also:
IDeploymentPluginContext.getBaseDir()
getManifestLocation
public final java.io.File getManifestLocation()
- Specified by:
getManifestLocation in interface IDeploymentPluginContext
- Returns:
- the menifest location
- See Also:
IDeploymentPluginContext.getManifestLocation()
getProject
public final org.apache.maven.project.MavenProject getProject()
- Specified by:
getProject in interface IDeploymentPluginContext
- Returns:
- the maven project
- See Also:
IDeploymentPluginContext.getProject()
getBuildDirectory
public final java.lang.String getBuildDirectory()
- Specified by:
getBuildDirectory in interface IDeploymentPluginContext
- Returns:
- the build directory
- See Also:
IDeploymentPluginContext.getBuildDirectory()
getSupportedProjectTypes
public final java.util.List<java.lang.String> getSupportedProjectTypes()
- Specified by:
getSupportedProjectTypes in interface IDeploymentPluginContext
- Returns:
- the supported packaging types
- See Also:
IDeploymentPluginContext.getSupportedProjectTypes()
getLocalRepository
public final org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
- Specified by:
getLocalRepository in interface IDeploymentPluginContext
- Returns:
- the local repository
- See Also:
IDeploymentPluginContext.getLocalRepository()
getRemoteRepositories
public final java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
- Specified by:
getRemoteRepositories in interface IDeploymentPluginContext
- Returns:
- the remote repositories
- See Also:
IDeploymentPluginContext.getRemoteRepositories()
getArtifactFactory
public final org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
- Specified by:
getArtifactFactory in interface IDeploymentPluginContext
- Returns:
- the artifact factory
- See Also:
IDeploymentPluginContext.getArtifactFactory()
getArtifactResolver
public final org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
- Specified by:
getArtifactResolver in interface IDeploymentPluginContext
- Returns:
- the artifact resolver
- See Also:
IDeploymentPluginContext.getArtifactResolver()
getArtifactHandlerManager
public final org.apache.maven.artifact.handler.manager.ArtifactHandlerManager getArtifactHandlerManager()
- Specified by:
getArtifactHandlerManager in interface IDeploymentPluginContext
- Returns:
- the artifact handler manager
- See Also:
IDeploymentPluginContext.getArtifactHandlerManager()
getArchiverManager
public final org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
- Specified by:
getArchiverManager in interface IDeploymentPluginContext
- Returns:
- the archiver manager
- See Also:
IDeploymentPluginContext.getArchiverManager()
getDeploymentPackageInfo
public final DeploymentPackageInfo getDeploymentPackageInfo()
- Specified by:
getDeploymentPackageInfo in interface IDeploymentPluginContext
- Returns:
- the deployment package info
- See Also:
IDeploymentPluginContext.getDeploymentPackageInfo()
isWriteExtraData
public final boolean isWriteExtraData()
- Specified by:
isWriteExtraData in interface IDeploymentPluginContext
- Returns:
TRUE if extra data should be generated into the manifest file, else FALSE>. Default is TRUE.- See Also:
IDeploymentPluginContext.isWriteExtraData()
getPluginName
public final java.lang.String getPluginName()
- TODO How do we get the plugin name?
- Specified by:
getPluginName in interface IDeploymentPluginContext
- Returns:
- the plugin name
- See Also:
IDeploymentPluginContext.getPluginName()
getPluginVersion
public final java.lang.String getPluginVersion()
- TODO How do we get the plugin version?
- Specified by:
getPluginVersion in interface IDeploymentPluginContext
- Returns:
- the plugin version
- See Also:
IDeploymentPluginContext.getPluginVersion()
setBaseDir
public final void setBaseDir(java.io.File p_baseDir)
- Parameters:
p_baseDir - the baseDir to set
setManifestLocation
public final void setManifestLocation(java.io.File p_manifestLocation)
- Parameters:
p_manifestLocation - the manifestLocation to set
setProject
public final void setProject(org.apache.maven.project.MavenProject p_project)
- Parameters:
p_project - the project to set
setBuildDirectory
public final void setBuildDirectory(java.lang.String p_buildDirectory)
- Parameters:
p_buildDirectory - the buildDirectory to set
setSupportedProjectTypes
public final void setSupportedProjectTypes(java.util.List<java.lang.String> p_supportedProjectTypes)
- Parameters:
p_supportedProjectTypes - the supportedProjectTypes to set
setLocalRepository
public final void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository p_localRepository)
- Parameters:
p_localRepository - the localRepository to set
setRemoteRepositories
public final void setRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> p_remoteRepositories)
- Parameters:
p_remoteRepositories - the remoteRepositories to set
setArtifactFactory
public final void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory p_artifactFactory)
- Parameters:
p_artifactFactory - the artifactFactory to set
setArtifactResolver
public final void setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver p_artifactResolver)
- Parameters:
p_artifactResolver - the artifactResolver to set
setArtifactHandlerManager
public final void setArtifactHandlerManager(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager p_artifactHandlerManager)
- Parameters:
p_artifactHandlerManager - the artifactHandlerManager to set
setArchiverManager
public final void setArchiverManager(org.codehaus.plexus.archiver.manager.ArchiverManager p_archiverManager)
- Parameters:
p_archiverManager - the archiverManager to set
setDeploymentPackageInfo
public final void setDeploymentPackageInfo(DeploymentPackageInfo p_deploymentPackageInfo)
- Parameters:
p_deploymentPackageInfo - the deploymentPackage to set
setDeploymentPackage
public final void setDeploymentPackage(DeploymentPackageInfo p_deploymentPackageInfo)
- Parameters:
p_deploymentPackageInfo - the deploymentPackage to set
setWriteExtraData
public final void setWriteExtraData(boolean p_writeExtraData)
- Parameters:
p_writeExtraData - the writeExtraData to set
resolveResource
public final java.io.File resolveResource(java.lang.String p_groupId,
java.lang.String p_artifactId,
java.lang.String p_version)
- This method resolves an artifact on all available repositories and returns the file handle to that artifact.
- Specified by:
resolveResource in interface IDeploymentPluginContext
- Parameters:
p_groupId - the groupId of the artifact to resolvep_artifactId - the artifactId of the artifact to resolvep_version - the version of the artifact to resolve
- Returns:
- the resolved file handle of the artifact
Copyright © 2008 Humboldt University Berlin. All Rights Reserved.