Package org.codehaus.mojo.exec
Class ExecJavaMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.exec.AbstractExecMojo
org.codehaus.mojo.exec.AbstractExecJavaBase
org.codehaus.mojo.exec.ExecJavaMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="java",
threadSafe=true,
requiresDependencyResolution=TEST)
public class ExecJavaMojo
extends AbstractExecJavaBase
Executes the supplied java class in the current VM with the enclosing project's dependencies as classpath.
This is the Java 8 base implementation.
- Since:
- 1.0
- Author:
- Kaare Nilsen (kaare.nilsen@gmail.com), David Smiley (dsmiley@mitre.org)
-
Field Summary
Fields inherited from class org.codehaus.mojo.exec.AbstractExecJavaBase
additionalClasspathElements, arguments, blockSystemExit, classpathFilenameExclusions, cleanupDaemonThreads, container, daemonThreadJoinTimeout, excludedJvmPackages, forcedJvmPackages, includeProjectDependencies, keepAlive, mainClass, originalSystemProperties, preloadCommonPool, stopUnresponsiveDaemonThreads, systemProperties, THREAD_STOP_UNAVAILABLEFields inherited from class org.codehaus.mojo.exec.AbstractExecMojo
classpathScope, executableDependency, includePluginDependencies, project, repositorySystemFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExecJavaMojo(org.eclipse.aether.RepositorySystem repositorySystem, org.codehaus.plexus.PlexusContainer container) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecModulePath(String moduleName, String bootClassName) Execute using module path (Java 9+ JPMS).Methods inherited from class org.codehaus.mojo.exec.AbstractExecJavaBase
addAdditionalClasspathElements, addRelevantPluginDependenciesToClasspath, addRelevantProjectDependenciesToClasspath, doExecClassLoader, doRun, execute, executeMainMethod, findMethod, getActiveThreads, getClassLoader, joinNonDaemonThreads, joinThread, lookup, lookupParam, newInstance, preloadCommonPool, propertiesUpdater, resolveVersion, setSystemProperties, terminateThreads, waitForMethods inherited from class org.codehaus.mojo.exec.AbstractExecMojo
collectProjectArtifactsAndClasspath, determineRelevantPluginDependencies, findExecutableArtifact, getPluginDependencies, getSession, hasCommandlineArgs, isSkip, parseCommandlineArgs, registerSourceRootsMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
ExecJavaMojo
@Inject protected ExecJavaMojo(org.eclipse.aether.RepositorySystem repositorySystem, org.codehaus.plexus.PlexusContainer container)
-
-
Method Details
-
doExecModulePath
Execute using module path (Java 9+ JPMS). This base implementation (Java 8) does not support JPMS and will throw an error. The Java 9+ version overrides this method with full JPMS support.- Specified by:
doExecModulePathin classAbstractExecJavaBase- Parameters:
moduleName- the module namebootClassName- the fully qualified class name- Throws:
Throwable- if execution fails
-