diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index 2eee4c224..5651626f2 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -242,8 +242,10 @@ public class Project { public void setProperty(String name, String value) { // command line properties take precedence - if (null != userProperties.get(name)) + if (null != userProperties.get(name)) { + log("Override ignored for user property " + name, MSG_VERBOSE); return; + } log("Setting project property: " + name + " -> " + value, MSG_DEBUG); properties.put(name, value); @@ -1034,6 +1036,10 @@ public class Project { } public void addReference(String name, Object value) { + if (null != references.get(name)) { + log("Overriding previous definition of reference to " + name, + MSG_WARN); + } log("Adding reference: " + name + " -> " + value, MSG_DEBUG); references.put(name,value); } diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index 9c9112487..db3ee9dc2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -418,29 +418,23 @@ public class Rmic extends MatchingTask { String classname, RmicAdapter adapter) throws BuildException { - String stubFileName = classname.replace('.', File.separatorChar) - + adapter.getStubClassSuffix()+".java"; - File oldStubFile = new File(baseDir, stubFileName); - File newStubFile = new File(sourceBaseFile, stubFileName); - try { - project.copyFile(oldStubFile, newStubFile, filtering); - oldStubFile.delete(); - } catch (IOException ioe) { - String msg = "Failed to copy " + oldStubFile + " to " + - newStubFile + " due to " + ioe.getMessage(); - throw new BuildException(msg, ioe, location); - } - if (!"1.2".equals(stubVersion)) { - String skelFileName = classname.replace('.', File.separatorChar) - + adapter.getSkelClassSuffix()+".java"; - File oldSkelFile = new File(baseDir, skelFileName); - File newSkelFile = new File(sourceBaseFile, skelFileName); + + String classFileName = + classname.replace('.', File.separatorChar) + ".class"; + String[] generatedFiles = + adapter.getMapper().mapFileName(classFileName); + + for (int i=0; i @@ -387,7 +387,7 @@ - Why does Ant always recompile all my Java files + Why does Ant always recompile all my Java files? diff --git a/webpage/xdocs/faq.xml b/webpage/xdocs/faq.xml index 28a0363aa..a573a88cb 100644 --- a/webpage/xdocs/faq.xml +++ b/webpage/xdocs/faq.xml @@ -114,7 +114,7 @@ - Why does Ant always recompile all my Java files + Why does Ant always recompile all my Java files?

In order to find out which files should be compiled, Ant