git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@793605 13f79535-47bb-0310-9956-ffa450edef68master
@@ -765,6 +765,10 @@ Other changes: | |||||
executable. | executable. | ||||
Bugzilla Report 46230. | 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 | Changes from Ant 1.7.0 TO Ant 1.7.1 | ||||
============================================= | ============================================= | ||||
@@ -208,6 +208,16 @@ please consult miniRMI's documentation to learn how to use it.</p> | |||||
compilers.)</td> | compilers.)</td> | ||||
<td align="center" valign="top">No</td> | <td align="center" valign="top">No</td> | ||||
</tr> | </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> | </table> | ||||
<h3>Parameters specified as nested elements</h3> | <h3>Parameters specified as nested elements</h3> | ||||
<h4>classpath and extdirs</h4> | <h4>classpath and extdirs</h4> | ||||
@@ -123,6 +123,8 @@ public class Rmic extends MatchingTask { | |||||
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | ||||
private String executable = null; | |||||
/** | /** | ||||
* Constructor for Rmic. | * Constructor for Rmic. | ||||
*/ | */ | ||||
@@ -488,6 +490,25 @@ public class Rmic extends MatchingTask { | |||||
return facade.getArgs(); | return facade.getArgs(); | ||||
} | } | ||||
/** | |||||
* 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 | * execute by creating an instance of an implementation | ||||
* class and getting to do the work | * class and getting to do the work | ||||
@@ -54,8 +54,13 @@ public class ForkingSunRmic extends DefaultRmicAdapter { | |||||
Rmic owner = getRmic(); | Rmic owner = getRmic(); | ||||
Commandline cmd = setupRmicCommand(); | Commandline cmd = setupRmicCommand(); | ||||
Project project = owner.getProject(); | 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 | //set up the args | ||||
String[] args = cmd.getCommandline(); | String[] args = cmd.getCommandline(); | ||||