diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index f82a622fa..110fc927a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -399,8 +399,12 @@ public class Rmic extends MatchingTask { } } - // Move the generated source file to the base directory - if (null != sourceBase) { + /* + * Move the generated source file to the base directory. If + * base directory and sourcebase are the same, the generated + * sources are already in place. + */ + if (null != sourceBase && !baseDir.equals(sourceBase)) { if (idl) { log("Cannot determine sourcefiles in idl mode, ", Project.MSG_WARN);