aspose file tools*
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
Author

Beginner problem

Derek Drever
Greenhorn

Joined: Mar 01, 2002
Posts: 18
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

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


Jon
Derek Drever
Greenhorn

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.
Regards,
Derek.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginner problem
 
Similar Threads
How to package class according directory?
Ant+JUnit
HOW TO COMPILE JAVA FILES PROGAMMATICALLY
[Ant] how to create a jar (not runnable) with other dependencies?
unable to create War using Ant