Browse Source

Make Rmic work when only one class is specified.

Submitted by:	Phillip Davidov <phillip.davidov@chipdata.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267775 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
80b22f776f
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      src/main/org/apache/tools/ant/taskdefs/Rmic.java

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

@@ -154,14 +154,14 @@ public class Rmic extends MatchingTask {
}
String classpath = getCompileClasspath(baseDir);

// scan base dirs to build up compile lists
DirectoryScanner ds = this.getDirectoryScanner(baseDir);
String[] files = ds.getIncludedFiles();
scanDir(baseDir, files, verify);
// scan base dirs to build up compile lists only if a
// specific classname is not given
if (classname == null) {
DirectoryScanner ds = this.getDirectoryScanner(baseDir);
String[] files = ds.getIncludedFiles();
scanDir(baseDir, files, verify);
}
// XXX
// need to provide an input stream that we read in from!

@@ -187,7 +187,7 @@ public class Rmic extends MatchingTask {
if (null != sourceBase) args[i++] = "-keepgenerated";

if (classname != null) {
if (shouldCompile(new File(baseDir, classname.replace('.', File.separatorChar)))) {
if (shouldCompile(new File(baseDir, classname.replace('.', File.separatorChar) + ".class"))) {
args[i++] = classname;
compiler.compile(args);
}


Loading…
Cancel
Save