File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Beginner problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Beginner problem" Watch "Beginner problem" New topic

Beginner problem

Derek Drever

Joined: Mar 01, 2002
Posts: 18
I have just started using Ant and I have created a small test project. When I build the project my java file is always compiled. I know from the Ant documentation and past messages in this forum that a possible source for the problem is the source and destination heirarchies not mirroring the structure of the package to be compiled.
My project is a single java file ( in a package called test. I have created a directory tree as follows:

When I compile the class file is added to basdir/classes/test. My build.xml script is as follows:

I am probably doing something obviously stupid but I cannot see the problem at the moment, any help would be appreciated. I am using Ant 1.5.3.
Jon Strayer
Ranch Hand

Joined: Dec 04, 2002
Posts: 133
The problem is here:
<property name="src" value="."/>
it needs to be
<property name="src" value="src"/>

Derek Drever

Joined: Mar 01, 2002
Posts: 18
Thanks for the help although I cannot believe I was so stupid as to miss that !!!
I do have a follow up question, I have created a build.xml file for a small project I have been working on, the build file is:

When I was setting this up I set control to be dependent on frame, I thought that this would be enough to cause the files in the includes list in control to be compiled if any of the files in the includes list in frame required compilation.
This does not happen, do I somehow need to recognize when the files in frame are compiled and force a compilation in control, or have I made another mistake.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Beginner problem
It's not a secret anymore!