public abstract class AbstractExecMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
classpathScope
Defines the scope of the classpath passed to the plugin.
|
protected ExecutableDependency |
executableDependency
If provided the ExecutableDependency identifies which of the plugin dependencies contains the executable class.
|
protected org.apache.maven.project.MavenProject |
project
The enclosing project.
|
| Constructor and Description |
|---|
AbstractExecMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
collectProjectArtifactsAndClasspath(java.util.List<org.apache.maven.artifact.Artifact> artifacts,
java.util.List<java.nio.file.Path> theClasspathFiles)
Collects the project artifacts in the specified List and the project specific classpath (build output and build
test output) Files in the specified List, depending on the plugin classpathScope value.
|
protected org.apache.maven.artifact.Artifact |
findExecutableArtifact()
Examine the plugin dependencies to find the executable artifact.
|
protected java.util.List<org.apache.maven.artifact.Artifact> |
getPluginDependencies() |
protected org.apache.maven.execution.MavenSession |
getSession() |
protected boolean |
hasCommandlineArgs() |
protected boolean |
isSkip()
Check if the execution should be skipped
|
protected java.lang.String[] |
parseCommandlineArgs()
Parses the argument string given by the user.
|
protected void |
registerSourceRoots()
Register compile and compile tests source roots if necessary
|
getLog, getPluginContext, setLog, setPluginContext@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter protected ExecutableDependency executableDependency
If includeProjectDependencies is set to true, all of the project dependencies will be included on
the executable's classpath. Whether a particular project dependency is a dependency of the identified
ExecutableDependency will be irrelevant to its inclusion in the classpath.
@Parameter(property="exec.classpathScope",
defaultValue="runtime")
protected java.lang.String classpathScope
protected void collectProjectArtifactsAndClasspath(java.util.List<org.apache.maven.artifact.Artifact> artifacts,
java.util.List<java.nio.file.Path> theClasspathFiles)
artifacts - the list where to collect the scope specific artifactstheClasspathFiles - the list where to collect the scope specific output directoriesprotected java.lang.String[] parseCommandlineArgs()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - for wrong formatted argumentsprotected boolean hasCommandlineArgs()
protected void registerSourceRoots()
protected boolean isSkip()
protected final org.apache.maven.execution.MavenSession getSession()
protected final java.util.List<org.apache.maven.artifact.Artifact> getPluginDependencies()
protected org.apache.maven.artifact.Artifact findExecutableArtifact()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if no executable artifact was foundCopyright © 2005–2023 MojoHaus. All rights reserved.