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 Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
If set to true the child process executes asynchronously and build execution continues in parallel.private boolean
If set to true, the asynchronous child process is destroyed upon JVM shutdown.(package private) File
(package private) File
(package private) String
Arguments separated by space for the executed program.private boolean
If set to true, it will include the dependencies that generate path exceptions in the classpath.(package private) static final String
private 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) File
private org.apache.maven.plugin.BuildPluginManager
private org.apache.commons.exec.ProcessDestroyer
(package private) org.apache.maven.project.MavenProject
private String
The -release argument for the Java compilerprivate org.apache.maven.execution.MavenSession
(package private) boolean
Skip the execution.private String
The -source argument for the Java compiler.private String
The -target argument for the Java compiler.(package private) File
The current working directory.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
executeCommandLine
(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String, String> enviro, FileOutputStream outputFile) (package private) int
executeCommandLine
(org.apache.commons.exec.Executor exec, org.apache.commons.exec.CommandLine commandLine, Map<String, String> enviro, OutputStream out, OutputStream err) 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) private static String
findExecutable
(String executable, List<String> paths) getCompileClasspathElements
(org.apache.maven.project.MavenProject project) (package private) org.apache.commons.exec.CommandLine
getExecutablePaths
(Map<String, String> enviro) private String
getJavaHomeEnv
(Map<String, String> enviro) (package private) static Path
Returns the path of the parent directory.private org.apache.commons.exec.ProcessDestroyer
(package private) void
private static boolean
hasExecutableExtension
(String exec) private static boolean
hasNativeExtension
(String exec) (package private) static boolean
(package private) static boolean
isTargetUsingJava8
(org.apache.commons.exec.CommandLine commandLine) (package private) void
preparePaths
(Path jdkHome) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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.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
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.ExecuteException
IOException
-
getProcessDestroyer
private org.apache.commons.exec.ProcessDestroyer getProcessDestroyer()
-