Browse Source

Add a listfiles attribute to rmic. PR 24359

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@805353 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
f31845f71d
4 changed files with 32 additions and 3 deletions
  1. +4
    -0
      WHATSNEW
  2. +7
    -0
      docs/manual/CoreTasks/rmic.html
  3. +1
    -1
      src/etc/testcases/taskdefs/rmic/rmic.xml
  4. +20
    -2
      src/main/org/apache/tools/ant/taskdefs/Rmic.java

+ 4
- 0
WHATSNEW View File

@@ -843,6 +843,10 @@ Other changes:
be written to a different location than the original classes.
Bugzilla Report 20699.

* <rmic> has a new listfiles attribute similar to the existing one of
<javac>.
Bugzilla Report 24359.

Changes from Ant 1.7.0 TO Ant 1.7.1
=============================================



+ 7
- 0
docs/manual/CoreTasks/rmic.html View File

@@ -224,6 +224,13 @@ please consult miniRMI's documentation to learn how to use it.</p>
<em>Since Ant 1.8.0</em>.</td>
<td align="center" valign="top">No</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>
</tr>
</table>

<p><a name="footnote-1">*1</a>:


+ 1
- 1
src/etc/testcases/taskdefs/rmic/rmic.xml View File

@@ -214,7 +214,7 @@
</target>

<target name="testDefault" depends="init">
<base-rmic compiler="default"/>
<base-rmic compiler="default" listfiles="true"/>
<assertBaseCompiled/>
</target>



+ 20
- 2
src/main/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -126,6 +126,8 @@ public class Rmic extends MatchingTask {

private String executable = null;

private boolean listFiles = false;

/**
* Constructor for Rmic.
*/
@@ -550,6 +552,14 @@ public class Rmic extends MatchingTask {
return facade.getImplementationClasspath(getProject());
}

/**
* If true, list the source files being handed off to the compiler.
* @param list if true list the source files
* @since Ant 1.8.0
*/
public void setListfiles(boolean list) {
listFiles = list;
}
/**
* execute by creating an instance of an implementation
* class and getting to do the work
@@ -600,8 +610,16 @@ public class Rmic extends MatchingTask {
}
int fileCount = compileList.size();
if (fileCount > 0) {
log("RMI Compiling " + fileCount + " class" + (fileCount > 1 ? "es" : "") + " to "
+ outputDir, Project.MSG_INFO);
log("RMI Compiling " + fileCount + " class"
+ (fileCount > 1 ? "es" : "") + " to "
+ outputDir, Project.MSG_INFO);

if (listFiles) {
for (int i = 0; i < fileCount; i++) {
log(compileList.get(i).toString());
}
}

// finally, lets execute the compiler!!
if (!adapter.execute()) {
throw new BuildException(ERROR_RMIC_FAILED, getLocation());


Loading…
Cancel
Save