Try compiling all the files at one go.
------x------
Well, I faced similar problem when compiling sources with inter-dependancy. I had folder structure like
com.myCompany.pkg1
com.myCompany.pkg2
com.myCompany.pkg3
com.myCompany.pkgn
Best(and simple) way to compile all of them is to compile them in single shot.
<javac srcdir="${src}" destdir="${classes}"/>
This solved my problem... probably will work for you also. All the best.