From aef407be4d33de09861a1f9677b2f15ea5ea8fdf Mon Sep 17 00:00:00 2001
From: Tomas Zezula
Date: Tue, 8 Mar 2016 21:39:19 +0100
Subject: [PATCH] Updated Java task manual. Added since tags.
---
manual/Tasks/java.html | 62 ++++++++++++++++++-
.../org/apache/tools/ant/taskdefs/Java.java | 8 +--
.../tools/ant/types/CommandlineJava.java | 24 +++----
3 files changed, 75 insertions(+), 19 deletions(-)
diff --git a/manual/Tasks/java.html b/manual/Tasks/java.html
index a83b0aff2..36d50ce53 100644
--- a/manual/Tasks/java.html
+++ b/manual/Tasks/java.html
@@ -54,9 +54,9 @@ attributes.
Required |
- classname |
+ classname |
the Java class to execute. |
- Either jar or classname |
+ Either jar, classname or module |
jar |
@@ -64,7 +64,7 @@ attributes.
Main-Class entry in the manifest). Fork must be set to true if this option is selected.
See notes below for more details.
- Either jar or classname |
+ Either jar, classname or module |
args |
@@ -119,6 +119,25 @@ attributes.
(ignored if fork is disabled)
No |
+
+ module |
+ The initial or main module to resolve. To specify
+ the module main class use the classname attribute.
+ Fork must be set to true if this option is selected.since Ant 1.9.7 |
+ Either jar, classname or module |
+
+
+ modulepath |
+ Specify where to find application modules. A list of directories of modules, module files or exploded modules.since Ant 1.9.7 |
+ No |
+
+
+ modulepathref |
+ The modulepath to use, given as reference to a PATH defined elsewhere.
+ since Ant 1.9.7 |
+ No |
+
failonerror |
Stop the buildprocess if the command exits with a
@@ -312,6 +331,18 @@ error and would mean the build exits.
, then <java> must return 0 otherwise the build will
exit, as the class was run by the build JVM.
+modulepath
+Since Ant 1.9.7
+Java 's modulepath attribute is a PATH like structure and can also be set via a nested
+modulepath element.
+
+upgrademodulepath
+Since Ant 1.9.7
+The location of modules that replace upgradeable modules in the runtime image
+can be specified using this PATH like structure.
+
+
JAR file execution
The parameter of the jar attribute is of type File;
@@ -400,6 +431,31 @@ log-prefix to [java1.4] .
JVM, as it takes different parameters for other JVMs,
That JVM can be started from <exec> if required.
+
+ <java
+ fork="true"
+ failonerror="true"
+ maxmemory="128m"
+ module="TestModule"
+ modulepath="lib:dist/test.jar"/>
+
+Runs the module TestModule resolved on the modulepath lib/:dist/test.jar
+with a maximum memory of 128MB. Any non zero return code breaks the build.
+
+ <java
+ fork="true"
+ failonerror="true"
+ maxmemory="128m"
+ module="TestModule"
+ classname="Main">
+ <modulepath>
+ <pathelement location="lib"/>
+ <pathelement location="dist/test.jar"/>
+ </modulepath>
+ </java>
+
+Runs the class Main in module TestModule resolved on the modulepath lib/:dist/test.jar
+with a maximum memory of 128MB. Any non zero return code breaks the build.
|