ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <K...@paranor.ch>
Subject RE: Problem building
Date Wed, 23 Jan 2002 16:22:18 GMT
I hope you meant to write "basedir" not "dase_dir".

The "srcdir" attribute of <javac> has to point to the root directory
containing the java source file you want to compile.  So if your sources for
module1 are in src/com/sub1/sub2/module1 you should set srcdir="src".  Which
files you want to compile you then specify with the "includes" attribute.
So for example:

<javac srcdir="src" destdir="classes" includes="com/sub1/sub2/module1/**"/>

But I suggest you take a closer look a the manual.

--
knut

> 
> I am a new ant user.  I'm sure the answer to this question is in the
> archives but they are currently unavailable so here goes:
>  
> If I have a package structure for 2 different modules
>  
> com.sub1.sub2.module1
> com.sub1.sub2.module2 
>  
> files in module 1 have the line " import com.sub1.sub2.module2.*; " 
> files in module 2 have the line " import com.sub1.sub2.module1.*; "
>  
> I can build from the command line in directory 
> com/sub1/sub2/module1 using 
>  
> java -classpath ../../../.. *.java
>  
> However I want each module to build on its own using ant and 
> to create its
> own jar file.  I have specified the dase_dir in my project to be
> "../../../.."
> and my compile line is:
>  
>         <javac srcdir="com/sub1/sub2/module1" destdir="classes" />
> 
> However the javac command fails on the first "import
> com.sub1.sub2.module2.*"; with the error package does not exist
>  
> Why is this?.
>  
> Thanks in advance
>  
> David
>  
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message