@Mojo(name="console",
requiresDependencyResolution=TEST)
public class ConsoleMojo
extends AbstractToolsMojo
ant property requires Java 8, as the included Ant version was compiled for Java 8.| Modifier and Type | Field and Description |
|---|---|
protected String |
consoleScript
Script file to load into console.
|
allowSystemExits, bindAllProjectProperties, bindAllSessionUserProperties, bindPropertiesToSeparateVariables, bindSessionUserOverrideProperties, includeClasspath, projectHelper, propertiesclassWrangler, GROOVY_1_5_0, GROOVY_SOURCES_PATTERN, JAVA_1_7, JAVA_1_8, JAVA_12, JAVA_SOURCES_PATTERN, minGroovyVersion, mojoExecution, pluginArtifacts, project, session| Constructor and Description |
|---|
ConsoleMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindAntBuilder(Class<?> consoleClass,
Class<?> bindingClass,
Object console)
Binds a new AntBuilder to the project properties.
|
void |
execute()
Executes this mojo.
|
protected void |
loadScript(Class<?> consoleClass,
Object console) |
protected Object |
setupConsole(Class<?> consoleClass,
Class<?> bindingClass)
Instantiates a groovy.ui.Console object.
|
protected void |
waitForConsoleClose()
Waits for the console in use to be closed.
|
initializeProperties, logUnableToInitializeAntBuildergetJavaVersion, getJavaVersionString, groovyAtLeast, groovyIs, groovyNewerThan, groovyOlderThan, groovyVersionSupportsAction, isGroovyIndy, isJavaSupportIndy, isJavaSupportParameters, isJavaSupportPreviewFeatures, logPluginClasspath, setupClassWrangler@Parameter(property="consoleScript") protected String consoleScript
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException - If an unexpected problem occurs (causes a "BUILD ERROR" message to be displayed)org.apache.maven.plugin.MojoFailureException - If unable to await console exitprotected void loadScript(Class<?> consoleClass, Object console) throws InvocationTargetException, IllegalAccessException
protected Object setupConsole(Class<?> consoleClass, Class<?> bindingClass) throws InvocationTargetException, IllegalAccessException, InstantiationException
consoleClass - the groovy.ui.Console class to usebindingClass - the groovy.lang.Binding class to useInvocationTargetException - when a reflection invocation needed for instantiating a console object cannot be completedIllegalAccessException - when a method needed for instantiating a console object cannot be accessedInstantiationException - when a class needed for instantiating a console object cannot be instantiatedprotected void bindAntBuilder(Class<?> consoleClass, Class<?> bindingClass, Object console) throws ClassNotFoundException, IllegalAccessException, InvocationTargetException
consoleClass - the groovy.ui.Console class to usebindingClass - the groovy.lang.Binding class to useconsole - the groovy.ui.Console object to useClassNotFoundException - when a class needed for binding an AntBuilder object cannot be foundIllegalAccessException - when a method needed for binding an AntBuilder object cannot be accessedInvocationTargetException - when a reflection invocation needed for binding an AntBuilder object cannot be completedprotected void waitForConsoleClose()
throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException - if the execution was interrupted while running or it was unable to find the console thread to wait onCopyright © 2011–2025. All rights reserved.