https://issues.apache.org/bugzilla/show_bug.cgi?id=48970

           Summary: Rmic task sourcebase attribute doesn't work as
                    expected
           Product: Ant
           Version: 1.8.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


When specified sourcebase for rmic, the generated source files are not moved to
the sourcebase directory as expected. For example, /tmp/c will be empty after
the following rmic task.

<rmic base="${project.java.classes}" sourcebase="/tmp/c" iiop="true"
verify="true" classpathref="compile.classpath"/>

However, it works as expected with Ant 1.7.0 and 1.7.1. 

After looking at the Ant 1.8.0 source, it appears sourceFileName didn't get the
suffix '.java' appended:

707     String sourceFileName = StringUtils.removeSuffix(generatedFile,
708                                                      ".class");
709 
710     File oldFile = new File(baseDir, sourceFileName);

And in the Ant 1.7.0 source, '.java' is appended to the sourceFileName at line
599 as following:

598    final int pos = generatedFile.length() - ".class".length();
599    String sourceFileName =
600          generatedFile.substring(0, pos) + ".java";
601 
602    File oldFile = new File(baseDir, sourceFileName);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to