From f31845f71d137a7891e010f0c8d2b8db6e81a8c6 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 18 Aug 2009 10:51:51 +0000 Subject: [PATCH] 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 --- WHATSNEW | 4 ++++ docs/manual/CoreTasks/rmic.html | 7 ++++++ src/etc/testcases/taskdefs/rmic/rmic.xml | 2 +- .../org/apache/tools/ant/taskdefs/Rmic.java | 22 +++++++++++++++++-- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 8551a3723..4a672c63f 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -843,6 +843,10 @@ Other changes: be written to a different location than the original classes. Bugzilla Report 20699. + * has a new listfiles attribute similar to the existing one of + . + Bugzilla Report 24359. + Changes from Ant 1.7.0 TO Ant 1.7.1 ============================================= diff --git a/docs/manual/CoreTasks/rmic.html b/docs/manual/CoreTasks/rmic.html index e99b412ab..f2148aab1 100644 --- a/docs/manual/CoreTasks/rmic.html +++ b/docs/manual/CoreTasks/rmic.html @@ -224,6 +224,13 @@ please consult miniRMI's documentation to learn how to use it.

Since Ant 1.8.0. No + + listfiles + Indicates whether the source files to be compiled will + be listed; defaults to no.
+ Since Ant 1.8.0. + No +

*1: diff --git a/src/etc/testcases/taskdefs/rmic/rmic.xml b/src/etc/testcases/taskdefs/rmic/rmic.xml index a8733a952..d8709bd07 100644 --- a/src/etc/testcases/taskdefs/rmic/rmic.xml +++ b/src/etc/testcases/taskdefs/rmic/rmic.xml @@ -214,7 +214,7 @@ - + diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index 5f6fdbe20..c9b52a773 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -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());