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 2009/07/13 17:04:36 UTC
svn commit: r793605 - in /ant/core/trunk: WHATSNEW
docs/manual/CoreTasks/rmic.html
src/main/org/apache/tools/ant/taskdefs/Rmic.java
src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
Author: bodewig
Date: Mon Jul 13 15:04:35 2009
New Revision: 793605
URL: http://svn.apache.org/viewvc?rev=793605&view=rev
Log:
Add an executable attribute to rmic. PR 42132
Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/docs/manual/CoreTasks/rmic.html
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=793605&r1=793604&r2=793605&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Jul 13 15:04:35 2009
@@ -765,6 +765,10 @@
executable.
Bugzilla Report 46230.
+ * <rmic>'s new executable attribute can be used to specify a
+ different executable.
+ Bugzilla Report 42132.
+
Changes from Ant 1.7.0 TO Ant 1.7.1
=============================================
Modified: ant/core/trunk/docs/manual/CoreTasks/rmic.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/rmic.html?rev=793605&r1=793604&r2=793605&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/rmic.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/rmic.html Mon Jul 13 15:04:35 2009
@@ -208,6 +208,16 @@
compilers.)</td>
<td align="center" valign="top">No</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>
+ </tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>classpath and extdirs</h4>
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java?rev=793605&r1=793604&r2=793605&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java Mon Jul 13 15:04:35 2009
@@ -123,6 +123,8 @@
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+ private String executable = null;
+
/**
* Constructor for Rmic.
*/
@@ -489,6 +491,25 @@
}
/**
+ * Name of the executable to use when forking.
+ *
+ * @since Ant 1.8.0
+ */
+ public void setExecutable(String ex) {
+ executable = ex;
+ }
+
+ /**
+ * Explicitly specified name of the executable to use when forking
+ * - if any.
+ *
+ * @since Ant 1.8.0
+ */
+ public String getExecutable() {
+ return executable;
+ }
+
+ /**
* execute by creating an instance of an implementation
* class and getting to do the work
* @throws org.apache.tools.ant.BuildException
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java?rev=793605&r1=793604&r2=793605&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/ForkingSunRmic.java Mon Jul 13 15:04:35 2009
@@ -54,8 +54,13 @@
Rmic owner = getRmic();
Commandline cmd = setupRmicCommand();
Project project = owner.getProject();
- //rely on RMIC being on the path
- cmd.setExecutable(JavaEnvUtils.getJdkExecutable(getExecutableName()));
+ String executable = owner.getExecutable();
+ if (executable == null) {
+ // no explicitly specified executable
+ // rely on RMIC being on the path
+ executable = JavaEnvUtils.getJdkExecutable(getExecutableName());
+ }
+ cmd.setExecutable(executable);
//set up the args
String[] args = cmd.getCommandline();