You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Joe Peer <jo...@wap-force.net> on 2000/08/12 15:40:27 UTC

beginners problem: compiler does not find packages

Hi everybody,

I have a problem when compiling my java packages using ANT.

I am pretty sure that it is NOT a bug in ant and i am pretty sure, that ANT
is correct installed on my system (because i built third-party projects with
ant without any problems)

i think i must be doing something wrong (i am not very clever in those
things.....)

so what is my concrete problem: i have multiple files, organized in multiple
packages. when i compile manually, everything works fine. when i compile
with ant, the java compiler ("modern", jdk1.3) brings stupid messages like
"package xyz does not exist" (yea, because the class files of that packages
are still waiting to get compiled! ;=)

-- it seems to me as if the compiler would not find "the right order" in
which he has to compile the files. in manual mode, the compiler does not
give up if he does not find a class-file, he tries to compile the
corresponding java source-file instead (i.e. when importing packages)

my directory structure looks like this:

d:\jsrc\com\itp\database\
d:\jsrc\com\itp\mail\
d:\jsrc\com\itp\waptools\
d:\jsrc\com\itp\wapsites\
d:\jsrc\com\itp\wapsites\security
d:\jsrc\com\itp\wapsites\sitemap
d:\jsrc\com\ibm\util\

my build.xml is located in d:\jsrc (but i tried out other combinations so
far)

my build.xml looks like this:

<?xml version="1.0"?>
<project name="wapsites" default="compiling" basedir=".">

  <target name="init">
    <property name="src.dir" value="." />
    <property name="dest.dir"
value="d:/orion/default-web-app/WEB-INF/classes/" />
  </target>

  <target name="compiling" depends="init">
     <javac srcdir="${src.dir}"
            destdir="${dest.dir}"
     />
  </target>
</project>

i start ant that way:
d:\>cd jsrc
d:\jsrc>ant

i am using win nt and jdk1.3

Has somebody an idea?
I would really like to use ant because it looks as it could be a great help,
but i really need some help to get into it...

thanks in advance!
joe peer

---------------
joepeer@wap-force.net


Re: beginners problem: compiler does not find packages

Posted by Joe Peer <jo...@wap-force.net>.
hi!

my problem is solved,

it had nothing to do with ant,
i had some mistake in my package structure and i simply do not know why it
took so long till i noticed it...

--joe