ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r805353 - in /ant/core/trunk: WHATSNEW docs/manual/CoreTasks/rmic.html src/etc/testcases/taskdefs/rmic/rmic.xml src/main/org/apache/tools/ant/taskdefs/Rmic.java
Date Tue, 18 Aug 2009 10:51:51 GMT
Author: bodewig
Date: Tue Aug 18 10:51:51 2009
New Revision: 805353

URL: http://svn.apache.org/viewvc?rev=805353&view=rev
Log:
Add a listfiles attribute to rmic.  PR 24359

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/docs/manual/CoreTasks/rmic.html
    ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=805353&r1=805352&r2=805353&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Aug 18 10:51:51 2009
@@ -843,6 +843,10 @@
    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
 =============================================
 

Modified: ant/core/trunk/docs/manual/CoreTasks/rmic.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/rmic.html?rev=805353&r1=805352&r2=805353&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/rmic.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/rmic.html Tue Aug 18 10:51:51 2009
@@ -224,6 +224,13 @@
       <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>:

Modified: ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml?rev=805353&r1=805352&r2=805353&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/rmic/rmic.xml Tue Aug 18 10:51:51 2009
@@ -214,7 +214,7 @@
   </target>
 
   <target name="testDefault" depends="init">
-    <base-rmic compiler="default"/>
+    <base-rmic compiler="default" listfiles="true"/>
     <assertBaseCompiled/>
   </target>
 

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=805353&r1=805352&r2=805353&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 Tue Aug 18 10:51:51 2009
@@ -126,6 +126,8 @@
 
     private String executable = null;
 
+    private boolean listFiles = false;
+
     /**
      * Constructor for Rmic.
      */
@@ -551,6 +553,14 @@
     }
 
     /**
+     * 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
      * @throws org.apache.tools.ant.BuildException
@@ -600,8 +610,16 @@
             }
             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());



Mime
View raw message