Hi all,
I had some serious problems when compiling some code.
I had quite a lot of broken code which didnt compile that
I was about to merge with some other stuff ................
I also had at least SOME code that compiled in the same tree.
When I used jdk 1.3.0 from ibm I got NOTHING output in my
destination directory. When I switched to jdk 1.2.2 from sun
I got the working files output to the destination directory as expected.
I didnt manage to create a small example which illustrates the behaviour
described above.
Has anyone got a clue to what is going on?
--------------------------
Below follows a little example that at least point out one strange
behaviour with the javac task. I would expect the following to not
compile, since the file A.java should not be compiled.
//-------------------
// A.java
class A {}
//-------------------
//-------------------
// B.java
class B extends A {}
//-------------------
//-------------------
// BB.java
class BB {}
//-------------------
------------------------
<project name="test" default="compile" basedir=".">
<property name="bk.excludefiles" value="**/SCCS/**" />
<target name="compile" depends="">
<javac srcdir="." destdir="."
debug="off" optimize="on" deprecation="off"
excludes="${bk.excludefiles}"
includes="*B.java"
>
</javac>
</target>
</project>
----------------------------------------
peternl:inc-exc>>which javac
/usr/local/development/java/jdk/Linux/from-ibm/1.3.0/bin/javac
peternl:inc-exc>>ant compile
Searching for build.xml ...
Buildfile: /home/petern/java/anttests/inc-exc/build.xml
compile:
[javac] Compiling 2 source files to
/home/petern/java/anttests/inc-exc
BUILD SUCCESSFUL
Total time: 1 seconds
peternl:inc-exc>>ls *.class|wc -w
3
-----------------------------------------------
So although ant says that 2 files are compiled, it compiles 3,
which I think it shouldnt.
I was using
ant/2000-09-20 on a RedHat 6.2 machine.
Regards,
Peter