Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beginner problem

 
Derek Drever
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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 (Test.java) 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.
Regards,
Derek.
 
Jon Strayer
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is here:
<property name="src" value="."/>
it needs to be
<property name="src" value="src"/>
 
Derek Drever
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Regards,
Derek.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic