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.AbstractMojo
Base class for Maven plugins manipulating extensions.- Since:
- 8.4RC1
- Version:
- $Id: ef5a3b50a4c06de0fcab3087afaf8b13aa9525e4 $
-
-
Field Summary
Fields Modifier and Type Field Description protected org.codehaus.plexus.PlexusContainer
container
protected List<ComponentRepresentation>
disabledComponents
The list of components to unregister.protected ExtensionMojoHelper
extensionHelper
protected List<ExtensionOverride>
extensionOverrides
protected org.apache.maven.artifact.repository.ArtifactRepository
localRepository
The local Maven repository used to resolve required artifacts.protected File
permanentDirectory
The permanent directory.protected org.apache.maven.project.MavenProject
project
protected String
recommendedVersions
protected org.apache.maven.execution.MavenSession
session
The current Maven session being executed.protected boolean
skip
-
Constructor Summary
Constructors Constructor Description AbstractExtensionMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
after()
protected void
before()
void
execute()
protected abstract void
executeInternal()
protected void
initializeExtensionMojoHelper()
protected boolean
isSkipExecution()
-
-
-
Field Detail
-
container
@Component protected org.codehaus.plexus.PlexusContainer container
-
session
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession session
The 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 permanentDirectory
The 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.MojoExecutionException
org.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.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
initializeExtensionMojoHelper
protected void initializeExtensionMojoHelper() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-