ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Søe Sørensen <Erik.S...@Tietoenator.com>
Subject Ant runs RMIC when not necesarry (looking for wrong stub file)
Date Mon, 26 Mar 2001 17:07:43 GMT
Hi.
I'm new to Ant, but I think I've found something related to RMIC which could
be improved:

Consider a file like this:
-------RmicTest.java:
  public class RmicTest {
      public class Inner implements java.rmi.Remote {
      }
  }
-------
- which has an inner class to be RMIC'ed.
However, it seems that Ant's RMIC-feature can't deal with inner classes
properly - the following buildfile:
-------build.xml:
<project name="test" default="target" basedir=".">
  <target name="target">
    <javac srcdir="." destdir="." includes="RmicTest.java" />
    <rmic classname="RmicTest.Inner" base="." />
  </target>
</project>
-------
makes Ant say this:
-------Ant verbose output:
Ant version 1.3 compiled on March 2 2001

Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: Windows NT
parsing buildfile c:\test\build.xml with URI = file:c:/test/build.xml
Project base dir set to: C:\test
Build sequence for target `target' is [target]
Complete build sequence is [target]

target:
    [javac] RmicTest.java omitted as C:\test\RmicTest.class is up to date.
     [rmic] RmicTest\Inner.class added as C:\test\RmicTest\Inner_Stub.class
doesn't exist.
     [rmic] RMI Compiling 1 class to C:\test
     [rmic] Compilation args: -d C:\test -classpath
C:\test;C:\jdk1.3\lib\tools.jar;C:\ant\lib\parser.jar;C:\ant\lib\jaxp.jar;C:
\ant\lib\ant.jar;C:\jdk1.3\jre\lib\rt.jar;C:\Programmer\Jini1_0_1\lib\jini-c
ore.jar;C:\Programmer\Jini1_0_1\lib\jini-ext.jar;C:\Programmer\Jini1_0_1\lib
\sun-util.jar;C:\Programmer\Jini1_0_1\lib\uiapi100.zip RmicTest.Inner

BUILD SUCCESSFUL

Total time: 2 seconds
-------
As you can see, the stub class tested for is
    C:\test\RmicTest\Inner_Stub.class
- but the stub class really built is
    C:\test\RmicTest$Inner_Stub.class
which is a problem (sort of).
It may be different with other JDKs, however.
    Erik Søe Sørensen

Mime
View raw message