You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2018/03/05 11:50:31 UTC
[1/2] ant git commit: Java11 removes support for rmic -idl/-iiop
Repository: ant
Updated Branches:
refs/heads/master 8425ca927 -> 1ab832724
Java11 removes support for rmic -idl/-iiop
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/5aa1e8ef
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/5aa1e8ef
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/5aa1e8ef
Branch: refs/heads/master
Commit: 5aa1e8eff81ad6005e62587cdaaa962fce1105ea
Parents: e50fdd7
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon Mar 5 12:45:56 2018 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Mon Mar 5 12:45:56 2018 +0100
----------------------------------------------------------------------
WHATSNEW | 7 ++++++
manual/Tasks/rmic.html | 16 +++++++++++--
.../ant/taskdefs/rmic/DefaultRmicAdapter.java | 18 ++++++++++++++
.../tools/ant/taskdefs/rmic/ForkingSunRmic.java | 15 ++++++++++++
.../tools/ant/taskdefs/rmic/KaffeRmic.java | 10 ++++++++
.../apache/tools/ant/taskdefs/rmic/WLRmic.java | 10 ++++++++
.../tools/ant/taskdefs/RmicAdvancedTest.java | 25 ++++++++++++++++----
7 files changed, 95 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 8c2af62..6dd00fe 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -17,6 +17,13 @@ Fixed bugs:
Bugzilla Report 62076
+Other changes:
+--------------
+
+ * when running on Java 11+ rmic will fail early if iiop or idl are
+ requested. Java11 removes support for CORBA and the switches have
+ been removed from the rmic tool.
+
Changes from Ant 1.9.9 TO Ant 1.9.10
====================================
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/manual/Tasks/rmic.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/rmic.html b/manual/Tasks/rmic.html
index fa927bf..c0d6daf 100644
--- a/manual/Tasks/rmic.html
+++ b/manual/Tasks/rmic.html
@@ -74,6 +74,14 @@ attribute. or a nested element.
project contains a compiler implementation for this task as well,
please consult miniRMI's documentation to learn how to use it.</p>
+<h4>CORBA support</h4>
+
+<p>Java 11 removes the CORBA and JavaEE packages and rmic no longer
+ supports either <code>iiop</code> nor <code>idl</code>. Starting
+ with Ant 1.9.11 the rmic task will fail when using either while
+ running Java11+ unless you fork the task and explicitly specify an
+ executable.</p>
+
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -168,7 +176,10 @@ please consult miniRMI's documentation to learn how to use it.</p>
</tr>
<tr>
<td valign="top">iiop</td>
- <td valign="top">indicates that portable (RMI/IIOP) stubs should be generated</td>
+ <td valign="top">indicates that portable (RMI/IIOP) stubs should
+ be generated.<br/>
+ See the note on CORBA support above.
+ </td>
<td align="center" valign="top">No</td>
</tr>
<tr>
@@ -178,7 +189,8 @@ please consult miniRMI's documentation to learn how to use it.</p>
</tr>
<tr>
<td valign="top">idl</td>
- <td valign="top">indicates that IDL output files should be generated</td>
+ <td valign="top">indicates that IDL output files should be
+ generated.<br/> See the note on CORBA support above.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
index d4483d9..37a14cb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
@@ -177,6 +177,18 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
}
/**
+ * Whether the iiop and idl switches are supported.
+ *
+ * <p>This implementation returns false if running on Java 11
+ * onwards and true otherwise.</p>
+ * @return true if the iiop and idl switches are supported
+ * @since Ant 1.9.11
+ */
+ protected boolean areIiopAndIdlSupported() {
+ return !JavaEnvUtils.isAtLeastJavaVersion("11");
+ }
+
+ /**
* Setup rmic argument for rmic.
* @return the command line
*/
@@ -223,6 +235,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
}
if (attributes.getIiop()) {
+ if (!areIiopAndIdlSupported()) {
+ throw new BuildException("this rmic implementation doesn't support the -iiop switch");
+ }
attributes.log("IIOP has been turned on.", Project.MSG_INFO);
cmd.createArgument().setValue("-iiop");
if (attributes.getIiopopts() != null) {
@@ -233,6 +248,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
}
if (attributes.getIdl()) {
+ if (!areIiopAndIdlSupported()) {
+ throw new BuildException("this rmic implementation doesn't support the -idl switch");
+ }
cmd.createArgument().setValue("-idl");
attributes.log("IDL has been turned on.", Project.MSG_INFO);
if (attributes.getIdlopts() != null) {
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
index 81bd797..9efc486 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
@@ -46,6 +46,21 @@ public class ForkingSunRmic extends DefaultRmicAdapter {
public static final String COMPILER_NAME = "forking";
/**
+ * @since Ant 1.9.11
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ boolean supported = !JavaEnvUtils.isAtLeastJavaVersion("11");
+ if (!supported && getRmic().getExecutable() != null) {
+ getRmic().getProject()
+ .log("Allowing -iiop and -idl for forked rmic even though this version of Java doesn't support it.",
+ Project.MSG_INFO);
+ return true;
+ }
+ return supported;
+ }
+
+ /**
* exec by creating a new command
* @return true if the command ran successfully
* @throws BuildException on error
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
index ff72ad4..f5f0bff 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
@@ -43,6 +43,16 @@ public class KaffeRmic extends DefaultRmicAdapter {
*/
public static final String COMPILER_NAME = "kaffe";
+ /**
+ * @since Ant 1.9.11
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ // actually I don't think Kaffee supports either, but we've
+ // accepted the flags prior to 1.9.11
+ return true;
+ }
+
/** {@inheritDoc} */
public boolean execute() throws BuildException {
getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE);
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
index 3b1f2a1..a4236d2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
@@ -53,6 +53,16 @@ public class WLRmic extends DefaultRmicAdapter {
public static final String UNSUPPORTED_STUB_OPTION = "Unsupported stub option: ";
/**
+ * @since Ant 1.9.11
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ // actually I don't think Weblogic's rmic supports either, but
+ // we've accepted the flags prior to 1.9.11
+ return true;
+ }
+
+ /**
* Carry out the rmic compilation.
* @return true if the compilation succeeded
* @throws BuildException on error
http://git-wip-us.apache.org/repos/asf/ant/blob/5aa1e8ef/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java
index 138712d..4991143 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java
@@ -411,7 +411,7 @@ public class RmicAdvancedTest {
*/
@Test
public void testIDL() throws Exception {
- buildRule.executeTarget("testIDL");
+ corbaTest("testIDL");
}
/**
@@ -421,7 +421,7 @@ public class RmicAdvancedTest {
*/
@Test
public void testIDLDest() throws Exception {
- buildRule.executeTarget("testIDLDest");
+ corbaTest("testIDLDest");
}
/**
@@ -431,7 +431,7 @@ public class RmicAdvancedTest {
*/
@Test
public void testIIOP() throws Exception {
- buildRule.executeTarget("testIIOP");
+ corbaTest("testIIOP");
}
/**
@@ -441,7 +441,7 @@ public class RmicAdvancedTest {
*/
@Test
public void testIIOPDest() throws Exception {
- buildRule.executeTarget("testIIOPDest");
+ corbaTest("testIIOPDest");
}
private void xnewTest(String target) {
@@ -457,6 +457,23 @@ public class RmicAdvancedTest {
}
}
+ private void corbaTest(String target) {
+ if (!JavaEnvUtils.isAtLeastJavaVersion("11")) {
+ buildRule.executeTarget(target);
+ } else {
+ try {
+ buildRule.executeTarget(target);
+ fail("Target should have thrown a BuildException");
+ } catch (BuildException ex) {
+ if (target.indexOf("IDL") > -1) {
+ assertEquals("this rmic implementation doesn't support the -idl switch", ex.getMessage());
+ } else {
+ assertEquals("this rmic implementation doesn't support the -iiop switch", ex.getMessage());
+ }
+ }
+ }
+ }
+
/**
* this little bunny verifies that we can load stuff, and that
* a failure to execute is turned into a fault
[2/2] ant git commit: Merge branch '1.9.x'
Posted by bo...@apache.org.
Merge branch '1.9.x'
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/1ab83272
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/1ab83272
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/1ab83272
Branch: refs/heads/master
Commit: 1ab832724b9365f12dbf230daf2a2ce0db883166
Parents: 8425ca9 5aa1e8e
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon Mar 5 12:50:19 2018 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Mon Mar 5 12:50:19 2018 +0100
----------------------------------------------------------------------
WHATSNEW | 3 +++
manual/Tasks/rmic.html | 14 +++++++++--
.../ant/taskdefs/rmic/DefaultRmicAdapter.java | 18 ++++++++++++++
.../tools/ant/taskdefs/rmic/ForkingSunRmic.java | 15 ++++++++++++
.../tools/ant/taskdefs/rmic/KaffeRmic.java | 10 ++++++++
.../apache/tools/ant/taskdefs/rmic/WLRmic.java | 10 ++++++++
.../tools/ant/taskdefs/RmicAdvancedTest.java | 25 ++++++++++++++++----
7 files changed, 89 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/WHATSNEW
----------------------------------------------------------------------
diff --cc WHATSNEW
index 4f82e81,6dd00fe..cd960d2
--- a/WHATSNEW
+++ b/WHATSNEW
@@@ -30,34 -20,12 +30,37 @@@ Fixed bugs
Other changes:
--------------
+ * Allow Saxon to be used for junitreport XSL transformation
+ Github Pull Request #57
+
+ * when running on Java 11+ rmic will fail early if iiop or idl are
+ requested. Java11 removes support for CORBA and the switches have
+ been removed from the rmic tool.
-Changes from Ant 1.9.9 TO Ant 1.9.10
-====================================
+Changes from Ant 1.10.1 TO Ant 1.10.2
+=====================================
+
+Changes that could break older environments:
+-------------------------------------------
+
+ * updated the dependency of BCEL to 6.2.
+ Bugzilla Report 61196
+
+ * delete task previously would silently accept wildcard (*)
+ value for the "file" attribute. That's no longer the case
+ and an exception could get thrown by the underlying filesystem
+ for such use. Usage like:
+
+ <delete file="/foo/bar/*.something"/>
+
+ should instead be changed to use resource collections like:
+
+ <delete>
+ <fileset dir="/foo/bar/" includes="*.something"/>
+ </delete>
+
+ * Commons Net 3.6 is binary-code, but not source compatible;
+ see change list of Commons Net 3.0 for details
* The Log4jListener is marked as deprecated as the required log4j library
(in version 1.x) is not maintained any more.
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/manual/Tasks/rmic.html
----------------------------------------------------------------------
diff --cc manual/Tasks/rmic.html
index 5c6c77a,c0d6daf..35c6302
--- a/manual/Tasks/rmic.html
+++ b/manual/Tasks/rmic.html
@@@ -24,193 -24,228 +24,203 @@@
<body>
-<h2><a name="rmic">Rmic</a></h2>
+<h2 id="rmic">Rmic</h2>
<h3>Description</h3>
-<p>Runs the rmic compiler for a certain class.</p>
-<p>Rmic can be run on a single class (as specified with the classname
-attribute) or a number of classes at once (all classes below base that
-are neither _Stub nor _Skel classes). If you want to rmic a single
-class and this class is a class nested into another class, you have to
-specify the classname in the form <code>Outer$$Inner</code> instead of
-<code>Outer.Inner</code>.</p>
-<p>It is possible to refine the set of files that are being rmiced. This can be
-done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
-attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
-have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
-the files you want to have excluded. This is also done with patterns. And
-finally with the <i>defaultexcludes</i> attribute, you can specify whether you
-want to use default exclusions or not. See the section on <a
-href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
+<p>Runs the <code>rmic</code> compiler for a certain class.</p>
+<p><code>Rmic</code> can be run on a single class (as specified with the classname attribute) or a
+number of classes at once (all classes below base that are neither <code>_Stub</code>
+nor <code>_Skel</code> classes). If you want to <code>rmic</code> a single class and this class is
+a class nested into another class, you have to specify the classname in the
+form <code>Outer$$Inner</code> instead of <code>Outer.Inner</code>.</p>
+<p>It is possible to refine the set of files that are being <code>rmic</code>ed. This can be done
+with the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
+and <var>defaultexcludes</var> attributes. With the <var>includes</var> or <var>includesfile</var>
+attribute you specify the files you want to have included by using patterns. The <var>exclude</var>
+or <var>excludesfile</var> attribute is used to specify the files you want to have excluded. This is
+also done with patterns. And finally with the <var>defaultexcludes</var> attribute, you can specify
+whether you want to use default exclusions or not. See the section
+on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
inclusion/exclusion of files works, and how to write patterns.</p>
-<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and
-supports most attributes of <code><fileset></code>
-(<code>dir</code> becomes <code>base</code>) as well as the nested
-<code><include></code>, <code><exclude></code> and
-<code><patternset></code> elements.</p>
-<p>It is possible to use different compilers. This can be selected
-with the "build.rmic" property, the <code>compiler</code>
-attribute. or a nested element.
-<a name="compilervalues">Here are the choices</a>:</p>
+<p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
+attributes of <code><fileset></code> (<var>dir</var> becomes <var>base</var>) as well as the
+nested <code><include></code>, <code><exclude></code>
+and <code><patternset></code> elements.</p>
+<p id="compilervalues">It is possible to use different compilers. This can be selected with
+the <code>build.rmic</code> property, the <var>compiler</var> attribute, or a nested element. Here
+are the choices:</p>
<ul>
- <li>default -the default compiler (kaffe, sun or forking) for the platform.
- <li>sun (the standard compiler of the JDK < JDK 9)</li>
- <li>kaffe (the standard compiler of <a href="http://www.kaffe.org" target="_top">Kaffe</a>)</li>
- <li>weblogic</li>
- <li>forking - the sun compiler forked into a separate process (since
- Apache Ant 1.7). Starting with Ant 1.9.8 this is the default when
- running on JDK 9+.</li>
- <li>xnew - the sun compiler forked into a separate process,
- with the -Xnew option (since Ant 1.7).
- This is the most reliable way to use -Xnew.
- <br></br>JDK9 has removed support for -Xnew and starting with Ant
- 1.9.8 this option will be rejected by ant when running on JDK9.</li>
- <li> "" (empty string). This has the same behaviour as not setting the compiler attribute.
- First the value of <tt>build.rmic</tt> is used if defined, and if not, the default
- for the platform is chosen. If build.rmic is set to this, you get the default.
-
+ <li><q>default</q>—the default compiler (<q>kaffe</q>, <q>sun</q> or <q>forking</q>) for the
+ platform.
+ <li><q>sun</q>—the standard compiler of the JDK < 9</li>
+ <li><q>kaffe</q>—the standard compiler of <a href="http://www.kaffe.org"
+ target="_top">Kaffe</a></li>
+ <li><q>weblogic</q></li>
+ <li><q>forking</q>—(<em>since Apache Ant 1.7</em>) the <q>sun</q> compiler forked into a
+ separate process. <em>Since Ant 1.9.8</em>, this is the default when running on JDK 9+.</li>
+ <li><q>xnew</q>—(<em>since Ant 1.7</em>) the <q>sun</q> compiler forked into a separate
+ process, with the <code>-Xnew</code> option. This is the most reliable way to
+ use <code>-Xnew</code>.<br/>JDK 9 has removed support for <code>-Xnew</code> and <em>since Ant
+ 1.9.8</em> this option will be rejected when running on JDK 9.</li>
+ <li><q></q> (empty string). This has the same behaviour as not setting the compiler attribute.
+ First the value of <code>build.rmic</code> is used if defined, and if not, the default for the
+ platform is chosen. If <code>build.rmic</code> is set to this, you get the default.</li>
</ul>
-<p>The <a href="http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a>
-project contains a compiler implementation for this task as well,
-please consult miniRMI's documentation to learn how to use it.</p>
+<p>The <a href="https://web.archive.org/web/20131225023602/http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a>
+project contains a compiler implementation for this task as well, please consult miniRMI's
+documentation to learn how to use it.</p>
+ <h4>CORBA support</h4>
+
+ <p>Java 11 removes the CORBA and JavaEE packages and rmic no longer
+ supports either <code>iiop</code> nor <code>idl</code>. Starting
- with Ant 1.9.11 the rmic task will fail when using either while
++ with Ant 1.10.3 the rmic task will fail when using either while
+ running Java11+ unless you fork the task and explicitly specify an
+ executable.</p>
+
<h3>Parameters</h3>
-<table border="1" cellpadding="2" cellspacing="0">
+<table class="attr">
<tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
+ <th>Attribute</th>
+ <th>Description</th>
+ <th>Required</th>
</tr>
- <tr>
- <td valign="top">base</td>
- <td valign="top">the location to store the compiled files.
- Also serves as the parent directory for any non-Fileset includes, etc.
- (This functionality has remained unchanged.)</td>
- <td valign="top" align="center" rowspan="2"><a href="#footnote-1">*1</a></td>
+ <tr id="footnote-1-back">
+ <td>base</td>
+ <td>the location to store the compiled files. Also serves as the parent directory for any
+ non-Fileset includes, etc. (This functionality has remained unchanged.)</td>
+ <td rowspan="2">See <a href="#footnote-1">note</a></td>
</tr>
<tr>
- <td valign="top">destdir</td>
- <td valign="top">the location to store the compiled files.</td>
+ <td>destdir</td>
+ <td class="left">the location to store the compiled files.</td>
</tr>
<tr>
- <td valign="top">classname</td>
- <td valign="top">the class for which to run <code>rmic</code>.</td>
- <td valign="top" align="center">No</td>
+ <td>classname</td>
+ <td>the class for which to run <code>rmic</code>.</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">filtering</td>
- <td valign="top">indicates whether token filtering should take place</td>
- <td valign="top" align="center">No</td>
+ <td>filtering</td>
+ <td>indicates whether token filtering should take place</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">sourcebase</td>
- <td valign="top">Pass the "-keepgenerated" flag to rmic and
- move the generated source file to the given sourcebase directory.</td>
- <td align="center" valign="top">No</td>
+ <td>sourcebase</td>
+ <td>Pass the <code>-keepgenerated</code> flag to <code>rmic</code> and move the generated source
+ file to the given <var>sourcebase</var> directory.</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">stubversion</td>
- <td valign="top">Specify the JDK version for the generated stub code.
- Specify "1.1" to pass the "-v1.1" option to rmic,
- "1.2" for -v12, compat for -vcompat. <br>
- Since Ant1.7, if you do not specify a version, and do not ask
- for iiop or idl files, "compat" is selected.
-
- </td>
- <td align="center" valign="top">No, default="compat"</td>
+ <td>stubversion</td>
+ <td>Specify the JDK version for the generated stub code. Specify <q>1.1</q> to pass
+ the <code>-v1.1</code> option to <code>rmic</code>, <q>1.2</q>
+ for <code>-v12</code>, <q>compat</q> for <code>-vcompat</code>.<br/><em>Since Ant 1.7</em>, if
+ you do not specify a version, and do not ask for <samp>.iiop</samp> or <samp>.idl</samp>
+ files, <q>compat</q> is selected.</td>
+ <td>No; default is <q>compat</q></td>
</tr>
<tr>
- <td valign="top">classpath</td>
- <td valign="top">The classpath to use during compilation</td>
- <td align="center" valign="top">No</td>
+ <td>classpath</td>
+ <td>The classpath to use during compilation</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">classpathref</td>
- <td valign="top">The classpath to use during compilation, given as <a
- href="../using.html#references">reference</a> to a PATH defined elsewhere</td>
- <td align="center" valign="top">No</td>
+ <td>classpathref</td>
+ <td>The classpath to use during compilation, given
+ as <a href="../using.html#references">reference</a> to a path defined elsewhere</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">includes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- included. All files are included when omitted.</td>
- <td valign="top" align="center">No</td>
+ <td>includes</td>
+ <td>comma- or space-separated list of patterns of files that must be included.</td>
+ <td>No; defaults to all (<q>**</q>)</td>
</tr>
<tr>
- <td valign="top">includesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an include pattern</td>
- <td valign="top" align="center">No</td>
+ <td>includesfile</td>
+ <td>name of a file. Each line of this file is taken to be an include pattern</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">excludes</td>
- <td valign="top">comma- or space-separated list of patterns of files that must be
- excluded. No files (except default excludes) are excluded when omitted.</td>
- <td valign="top" align="center">No</td>
+ <td>excludes</td>
+ <td>comma- or space-separated list of patterns of files that must be excluded.</td>
+ <td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
</tr>
<tr>
- <td valign="top">excludesfile</td>
- <td valign="top">the name of a file. Each line of this file is
- taken to be an exclude pattern</td>
- <td valign="top" align="center">No</td>
+ <td>excludesfile</td>
+ <td>name of a file. Each line of this file is taken to be an exclude pattern</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">defaultexcludes</td>
- <td valign="top">indicates whether default excludes should be used or not
- ("yes"/"no"). Default excludes are used when omitted.</td>
- <td valign="top" align="center">No</td>
+ <td>defaultexcludes</td>
+ <td>indicates whether default excludes should be used or not (<q>yes|no</q>).</td>
+ <td>No; defaults to <q>yes</q></td>
</tr>
<tr>
- <td valign="top">verify</td>
- <td valign="top">check that classes implement Remote before handing them
- to rmic (default is false)</td>
- <td align="center" valign="top">No</td>
+ <td>verify</td>
+ <td>check that classes implement <code>Remote</code> before handing them to <code>rmic</code></td>
+ <td>No; default is <q>false</q></td>
</tr>
<tr>
- <td valign="top">iiop</td>
- <td valign="top">indicates that portable (RMI/IIOP) stubs should
- be generated.<br/>
- See the note on CORBA support above.
- </td>
- <td align="center" valign="top">No</td>
+ <td>iiop</td>
- <td>indicates that portable (RMI/IIOP) stubs should be generated</td>
++ <td>indicates that portable (RMI/IIOP) stubs should be
++ generated.<br/> See the note on CORBA support above.</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">iiopopts</td>
- <td valign="top">additional arguments for IIOP class generation</td>
- <td align="center" valign="top">No</td>
+ <td>iiopopts</td>
+ <td>additional arguments for IIOP class generation</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">idl</td>
- <td valign="top">indicates that IDL output files should be
- generated.<br/> See the note on CORBA support above.</td>
- <td align="center" valign="top">No</td>
+ <td>idl</td>
- <td>indicates that IDL output files should be generated</td>
++ <td>indicates that IDL output files should be generated.<br/> See
++ the note on CORBA support above.</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">idlopts</td>
- <td valign="top">additional arguments for IDL file generation</td>
- <td align="center" valign="top">No</td>
+ <td>idlopts</td>
+ <td>additional arguments for IDL file generation</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">debug</td>
- <td valign="top">generate debug info (passes -g to rmic). Defaults to false.</td>
- <td align="center" valign="top">No</td>
+ <td>debug</td>
+ <td>generate debug info (passes <code>-g</code> to <code>rmic</code>)</td>
+ <td>No; defaults to <q>false</q></td>
</tr>
<tr>
- <td valign="top">includeAntRuntime</td>
- <td valign="top">whether to include the Ant run-time libraries;
- defaults to <code>yes</code>.</td>
- <td align="center" valign="top">No</td>
+ <td>includeAntRuntime</td>
+ <td>whether to include the Ant run-time libraries</td>
+ <td>No; defaults to <q>yes</q></td>
</tr>
<tr>
- <td valign="top">includeJavaRuntime</td>
- <td valign="top">whether to include the default run-time
- libraries from the executing VM; defaults to <code>no</code>.</td>
- <td align="center" valign="top">No</td>
+ <td>includeJavaRuntime</td>
+ <td>whether to include the default run-time libraries from the executing JVM</td>
+ <td>No; defaults to <q>no</q></td>
</tr>
<tr>
- <td valign="top">extdirs</td>
- <td valign="top">location of installed extensions.</td>
- <td align="center" valign="top">No</td>
+ <td>extdirs</td>
+ <td>location of installed extensions</td>
+ <td>No</td>
</tr>
<tr>
- <td valign="top">compiler</td>
- <td valign="top">The compiler implementation to use.
- If this attribute is not set, the value of the
- <code>build.rmic</code> property, if set, will be used.
- Otherwise, the default compiler for the current VM will be used.
- (See the above <a href="#compilervalues">list</a> of valid
- compilers.)</td>
- <td align="center" valign="top">No</td>
+ <td>compiler</td>
+ <td>The compiler implementation to use. (See the above <a href="#compilervalues">list</a> of
+ valid compilers.)</td>
+ <td>No; defaults to the value of the <code>build.rmic</code> property, if set, and the default
+ compiler for the current JDK otherwise</td>
</tr>
<tr>
- <td valign="top">executable</td>
- <td valign="top">Complete path to the <code>rmic</code>
- executable to use in case of the <code>forking</code>
- or <code>xnew</code> compiler.
- Defaults to the rmic compiler of the Java version that is currently
- running Ant.<br/>
- <em>Since Ant 1.8.0</em>.</td>
- <td align="center" valign="top">No</td>
+ <td>executable</td>
+ <td>Complete path to the <code>rmic</code> executable to use in case of the <q>forking</q>
+ or <q>xnew</q> compiler. <em>Since Ant 1.8.0</em>.</td>
+ <td>No; defaults to the <code>rmic</code> compiler of JDK that is currently running Ant</td>
</tr>
<tr>
- <td valign="top">listfiles</td>
- <td valign="top">Indicates whether the source files to be compiled will
- be listed; defaults to <code>no</code>.<br/>
- <em>Since Ant 1.8.0</em>.</td>
- <td align="center" valign="top">No</td>
+ <td>listfiles</td>
+ <td>Indicates whether the source files to be compiled will be listed. <em>Since Ant
+ 1.8.0</em>.</td>
+ <td>No; defaults to <q>no</q></td>
</tr>
</table>
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
index 914598f,37a14cb..f3a0503
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
@@@ -176,6 -177,18 +176,18 @@@ public abstract class DefaultRmicAdapte
}
/**
+ * Whether the iiop and idl switches are supported.
+ *
+ * <p>This implementation returns false if running on Java 11
+ * onwards and true otherwise.</p>
+ * @return true if the iiop and idl switches are supported
- * @since Ant 1.9.11
++ * @since Ant 1.10.3
+ */
+ protected boolean areIiopAndIdlSupported() {
+ return !JavaEnvUtils.isAtLeastJavaVersion("11");
+ }
+
+ /**
* Setup rmic argument for rmic.
* @return the command line
*/
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
index 7f67009,9efc486..bd2e562
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
@@@ -46,6 -46,21 +46,21 @@@ public class ForkingSunRmic extends Def
public static final String COMPILER_NAME = "forking";
/**
- * @since Ant 1.9.11
++ * @since Ant 1.10.3
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ boolean supported = !JavaEnvUtils.isAtLeastJavaVersion("11");
+ if (!supported && getRmic().getExecutable() != null) {
+ getRmic().getProject()
+ .log("Allowing -iiop and -idl for forked rmic even though this version of Java doesn't support it.",
+ Project.MSG_INFO);
+ return true;
+ }
+ return supported;
+ }
+
+ /**
* exec by creating a new command
* @return true if the command ran successfully
* @throws BuildException on error
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
index 018ba95,f5f0bff..bf27751
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
@@@ -43,8 -43,17 +43,18 @@@ public class KaffeRmic extends DefaultR
*/
public static final String COMPILER_NAME = "kaffe";
+ /**
- * @since Ant 1.9.11
++ * @since Ant 1.10.3
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ // actually I don't think Kaffee supports either, but we've
- // accepted the flags prior to 1.9.11
++ // accepted the flags prior to 1.10.3
+ return true;
+ }
+
/** {@inheritDoc} */
+ @Override
public boolean execute() throws BuildException {
getRmic().log("Using Kaffe rmic", Project.MSG_VERBOSE);
Commandline cmd = setupRmicCommand();
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
index 17a7650,a4236d2..da82048
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
@@@ -52,6 -53,16 +52,16 @@@ public class WLRmic extends DefaultRmic
public static final String UNSUPPORTED_STUB_OPTION = "Unsupported stub option: ";
/**
- * @since Ant 1.9.11
++ * @since Ant 1.10.3
+ */
+ @Override
+ protected boolean areIiopAndIdlSupported() {
+ // actually I don't think Weblogic's rmic supports either, but
- // we've accepted the flags prior to 1.9.11
++ // we've accepted the flags prior to 1.10.3
+ return true;
+ }
+
+ /**
* Carry out the rmic compilation.
* @return true if the compilation succeeded
* @throws BuildException on error
http://git-wip-us.apache.org/repos/asf/ant/blob/1ab83272/src/tests/junit/org/apache/tools/ant/taskdefs/RmicAdvancedTest.java
----------------------------------------------------------------------