Class 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
    • Constructor Detail

      • ExecJavaMojo

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

      • doExecModulePath

        protected void doExecModulePath​(java.lang.String moduleName,
                                        java.lang.String bootClassName)
                                 throws java.lang.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:
        java.lang.Throwable - if execution fails