Class ExecJavaMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
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)
  • Constructor Details

    • ExecJavaMojo

      @Inject protected ExecJavaMojo(org.eclipse.aether.RepositorySystem repositorySystem, org.codehaus.plexus.PlexusContainer container)
  • Method Details

    • doExecModulePath

      protected void doExecModulePath(String moduleName, String bootClassName) throws Throwable
      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:
      doExecModulePath in class AbstractExecJavaBase
      Parameters:
      moduleName - the module name
      bootClassName - the fully qualified class name
      Throws:
      Throwable - if execution fails