ExecJavaMojo
, ExecMojo
public abstract class AbstractExecMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field | Description |
---|---|---|
protected 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 | Description |
---|---|
AbstractExecMojo() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
collectProjectArtifactsAndClasspath(List<org.apache.maven.artifact.Artifact> artifacts,
List<File> 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 boolean |
hasCommandlineArgs() |
|
protected boolean |
isSkip() |
Check if the execution should be skipped
|
protected String[] |
parseCommandlineArgs() |
Parses the argument string given by the user.
|
protected void |
registerSourceRoots() |
Register compile and compile tests source roots if necessary
|
@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 String classpathScope
protected void collectProjectArtifactsAndClasspath(List<org.apache.maven.artifact.Artifact> artifacts, List<File> theClasspathFiles)
artifacts
- the list where to collect the scope specific artifactstheClasspathFiles
- the list where to collect the scope specific output directoriesprotected 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 org.apache.maven.artifact.Artifact findExecutableArtifact() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if no executable artifact was foundCopyright © 2005–2019 MojoHaus. All rights reserved.