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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf set to true the child process executes asynchronously and build execution continues in parallel.private booleanIf set to true, the asynchronous child process is destroyed upon JVM shutdown.(package private) File(package private) File(package private) StringArguments separated by space for the executed program.private booleanIf set to true, it will include the dependencies that generate path exceptions in the classpath.(package private) static final Stringprivate org.codehaus.plexus.languages.java.jpms.LocationManager(package private) String(package private) org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor(package private) List<?> A list of vm options passed to theexecutable.(package private) Fileprivate org.apache.maven.plugin.BuildPluginManagerprivate org.apache.commons.exec.ProcessDestroyer(package private) org.apache.maven.project.MavenProjectprivate StringThe -release argument for the Java compilerprivate org.apache.maven.execution.MavenSession(package private) booleanSkip the execution.private StringThe -source argument for the Java compiler.private StringThe -target argument for the Java compiler.(package private) FileThe current working directory.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intexecuteCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String, String> enviro, FileOutputStream outputFile) (package private) intexecuteCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String, String> enviro, OutputStream out, OutputStream err) private intexecuteCommandLine(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String, String> enviro, org.apache.commons.exec.PumpStreamHandler psh) private static StringfindExecutable(String executable, List<String> paths) getCompileClasspathElements(org.apache.maven.project.MavenProject project) (package private) org.apache.commons.exec.CommandLinegetExecutablePaths(Map<String, String> enviro) private StringgetJavaHomeEnv(Map<String, String> enviro) (package private) static PathReturns the path of the parent directory.private org.apache.commons.exec.ProcessDestroyer(package private) voidprivate static booleanhasExecutableExtension(String exec) private static booleanhasNativeExtension(String exec) (package private) static boolean(package private) static booleanisTargetUsingJava8(org.apache.commons.exec.CommandLine commandLine) (package private) voidpreparePaths(Path jdkHome) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
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
-
skip
@Parameter(property="javafx.skip", defaultValue="false") boolean skipSkip the execution. -
basedir
-
builddir
-
workingDirectory
The current working directory. Optional. If not specified, basedir will be used. -
compilePath
-
outputFile
-
async
@Parameter(property="javafx.async", defaultValue="false") private boolean asyncIf set to true the child process executes asynchronously and build execution continues in parallel. -
asyncDestroyOnShutdown
@Parameter(property="javafx.asyncDestroyOnShutdown", defaultValue="true") private boolean asyncDestroyOnShutdownIf 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
A list of vm options passed to the
executable. -
commandlineArgs
Arguments separated by space for the executed program. For example: "-j 20" -
source
The -source argument for the Java compiler.
-
target
The -target argument for the Java compiler.
-
release
The -release argument for the Java compiler -
includePathExceptionsInClasspath
@Parameter(property="javafx.includePathExceptionsInClasspath", defaultValue="false") private boolean includePathExceptionsInClasspathIf set to true, it will include the dependencies that generate path exceptions in the classpath. Default is false. -
classpathElements
-
modulepathElements
-
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
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getCompileClasspathElements
-
handleWorkingDirectory
void handleWorkingDirectory() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
handleSystemEnvVariables
-
getExecutablePath
-
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.ExecuteExceptionIOException
-
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.ExecuteExceptionIOException
-
getParent
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 evaluateddepth- Depth of the path relative to parent- Returns:
- Path to the parent, if exists. Null, otherwise.
-
findExecutable
-
hasNativeExtension
-
hasExecutableExtension
-
getExecutableExtensions
-
getExecutablePaths
-
getJavaHomeEnv
-
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.ExecuteExceptionIOException
-
getProcessDestroyer
private org.apache.commons.exec.ProcessDestroyer getProcessDestroyer()
-