Package org.xwiki.tool.extension.util
Class AbstractExtensionMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.xwiki.tool.extension.util.AbstractExtensionMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DependencyTreeMojo,RegisterMojo,WarMojo,XIPMojo
public abstract class AbstractExtensionMojo extends org.apache.maven.plugin.AbstractMojoBase class for Maven plugins manipulating extensions.- Since:
- 8.4RC1
- Version:
- $Id: ef5a3b50a4c06de0fcab3087afaf8b13aa9525e4 $
-
-
Field Summary
Fields Modifier and Type Field Description protected org.codehaus.plexus.PlexusContainercontainerprotected List<ComponentRepresentation>disabledComponentsThe list of components to unregister.protected ExtensionMojoHelperextensionHelperprotected List<ExtensionOverride>extensionOverridesprotected org.apache.maven.artifact.repository.ArtifactRepositorylocalRepositoryThe local Maven repository used to resolve required artifacts.protected FilepermanentDirectoryThe permanent directory.protected org.apache.maven.project.MavenProjectprojectprotected StringrecommendedVersionsprotected org.apache.maven.execution.MavenSessionsessionThe current Maven session being executed.protected booleanskip
-
Constructor Summary
Constructors Constructor Description AbstractExtensionMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidafter()protected voidbefore()voidexecute()protected abstract voidexecuteInternal()protected voidinitializeExtensionMojoHelper()protected booleanisSkipExecution()
-
-
-
Field Detail
-
container
@Component protected org.codehaus.plexus.PlexusContainer container
-
session
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession sessionThe current Maven session being executed.
-
localRepository
@Parameter(property="localRepository") protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
The local Maven repository used to resolve required artifacts.
-
extensionOverrides
@Parameter protected List<ExtensionOverride> extensionOverrides
- Since:
- 9.5RC1
-
skip
@Parameter protected boolean skip
- Since:
- 9.5RC1
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
-
permanentDirectory
@Parameter(defaultValue="${project.build.directory}/data/") protected File permanentDirectoryThe permanent directory.- Since:
- 9.5RC1
-
recommendedVersions
@Parameter(defaultValue="${xwiki.extension.recommendedVersions}") protected String recommendedVersions
-
disabledComponents
@Parameter protected List<ComponentRepresentation> disabledComponents
The list of components to unregister.- Since:
- 12.2
-
extensionHelper
protected ExtensionMojoHelper extensionHelper
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
isSkipExecution
protected boolean isSkipExecution()
-
before
protected void before() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
after
protected void after() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
executeInternal
protected abstract void executeInternal() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
initializeExtensionMojoHelper
protected void initializeExtensionMojoHelper() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-