Package org.openjfx

Class JavaFXBaseMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.openjfx.JavaFXBaseMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JavaFXJLinkMojo, JavaFXRunMojo

abstract class JavaFXBaseMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • JAVAFX_PREFIX

      static final String JAVAFX_PREFIX
      See Also:
    • project

      @Parameter(defaultValue="${project}", readonly=true) org.apache.maven.project.MavenProject project
    • session

      @Parameter(defaultValue="${session}", readonly=true) private org.apache.maven.execution.MavenSession session
    • pluginManager

      @Component private org.apache.maven.plugin.BuildPluginManager pluginManager
    • locationManager

      @Component private org.codehaus.plexus.languages.java.jpms.LocationManager locationManager
    • mainClass

      @Parameter(property="javafx.mainClass", required=true) String mainClass
    • skip

      @Parameter(property="javafx.skip", defaultValue="false") boolean skip
      Skip the execution.
    • basedir

      @Parameter(readonly=true, required=true, defaultValue="${basedir}") File basedir
    • builddir

      @Parameter(readonly=true, required=true, defaultValue="${project.build.directory}") File builddir
    • workingDirectory

      @Parameter(property="javafx.workingDirectory") File workingDirectory
      The current working directory. Optional. If not specified, basedir will be used.
    • compilePath

      @Parameter(defaultValue="${project.compileClasspathElements}", readonly=true, required=true) private List<String> compilePath
    • outputFile

      @Parameter(property="javafx.outputFile") File outputFile
    • async

      @Parameter(property="javafx.async", defaultValue="false") private boolean async
      If set to true the child process executes asynchronously and build execution continues in parallel.
    • asyncDestroyOnShutdown

      @Parameter(property="javafx.asyncDestroyOnShutdown", defaultValue="true") private boolean asyncDestroyOnShutdown
      If set to true, the asynchronous child process is destroyed upon JVM shutdown. If set to false, asynchronous child process continues execution after JVM shutdown. Applies only to asynchronous processes; ignored for synchronous processes.
    • options

      @Parameter List<?> options

      A list of vm options passed to the executable.

    • commandlineArgs

      @Parameter(property="javafx.args") String commandlineArgs
      Arguments separated by space for the executed program. For example: "-j 20"
    • source

      @Parameter(property="javafx.source", defaultValue="11") private String source

      The -source argument for the Java compiler.

    • target

      @Parameter(property="javafx.target", defaultValue="11") private String target

      The -target argument for the Java compiler.

    • release

      @Parameter(property="javafx.release", defaultValue="11") private String release
      The -release argument for the Java compiler
    • includePathExceptionsInClasspath

      @Parameter(property="javafx.includePathExceptionsInClasspath", defaultValue="false") private boolean includePathExceptionsInClasspath
      If set to true, it will include the dependencies that generate path exceptions in the classpath. Default is false.
    • classpathElements

      List<String> classpathElements
    • modulepathElements

      List<String> modulepathElements
    • pathElements

      Map<String,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> pathElements
    • moduleDescriptor

      org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor moduleDescriptor
    • processDestroyer

      private org.apache.commons.exec.ProcessDestroyer processDestroyer
  • Constructor Details

    • JavaFXBaseMojo

      JavaFXBaseMojo()
  • Method Details

    • isMavenUsingJava8

      static boolean isMavenUsingJava8()
    • isTargetUsingJava8

      static boolean isTargetUsingJava8(org.apache.commons.exec.CommandLine commandLine)
    • preparePaths

      void preparePaths(Path jdkHome) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getCompileClasspathElements

      private List<File> getCompileClasspathElements(org.apache.maven.project.MavenProject project)
    • handleWorkingDirectory

      void handleWorkingDirectory() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • handleSystemEnvVariables

      Map<String,String> handleSystemEnvVariables()
    • getExecutablePath

      org.apache.commons.exec.CommandLine getExecutablePath(String executable, Map<String,String> enviro, File dir)
    • executeCommandLine

      int executeCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String,String> enviro, OutputStream out, OutputStream err) throws org.apache.commons.exec.ExecuteException, IOException
      Throws:
      org.apache.commons.exec.ExecuteException
      IOException
    • executeCommandLine

      int executeCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String,String> enviro, FileOutputStream outputFile) throws org.apache.commons.exec.ExecuteException, IOException
      Throws:
      org.apache.commons.exec.ExecuteException
      IOException
    • getParent

      static Path getParent(Path path, int depth)
      Returns the path of the parent directory. At the given depth if the path has no parent, the method returns null.
      Parameters:
      path - Path against which the parent needs to be evaluated
      depth - Depth of the path relative to parent
      Returns:
      Path to the parent, if exists. Null, otherwise.
    • findExecutable

      private static String findExecutable(String executable, List<String> paths)
    • hasNativeExtension

      private static boolean hasNativeExtension(String exec)
    • hasExecutableExtension

      private static boolean hasExecutableExtension(String exec)
    • getExecutableExtensions

      private static List<String> getExecutableExtensions()
    • getExecutablePaths

      private List<String> getExecutablePaths(Map<String,String> enviro)
    • getJavaHomeEnv

      private String getJavaHomeEnv(Map<String,String> enviro)
    • executeCommandLine

      private int executeCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String,String> enviro, org.apache.commons.exec.PumpStreamHandler psh) throws org.apache.commons.exec.ExecuteException, IOException
      Throws:
      org.apache.commons.exec.ExecuteException
      IOException
    • getProcessDestroyer

      private org.apache.commons.exec.ProcessDestroyer getProcessDestroyer()