aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes 3th day with ant , help please 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 "3th day with ant , help please" Watch "3th day with ant , help please" New topic
Author

3th day with ant , help please

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi all.
I am learning ant and encountered these questions:
1. the default target for my build file is "packageing", which package the the class files and produce an executable jar file.
ok, but I found in ant manual that we must provide a cleanup target which deletes some dirs :
<target name="clean">
<delete dir="${buildDir}" />
<delete dir="${distDir}" />
</target>
when running ant again , the clean target doesn't run (I mean , these dirs didnt delete), so can you explain what should I do ?
indead, if we delete these dirs, and lost our executable files, so why we provide this target??
2. Then I have cahenged the default target and put instead of "run target" which invokes the java command on my main class.
when running ant , its running the application , but the application terminates in one second.
so what??
Tony Yan
Ranch Hand

Joined: Apr 10, 2002
Posts: 170
you need to specify the depends attribute in all those targets to build their dependencies. Check Ant Manual for details. The idea is that if your default target is 'clean_up', then make sure it depends on other targets, which then will be run themselves.


Tony Yan<br /> <br />IBM Certified Developer XML and Related Technology<br />Sun Certified Web Component Developer For J2EE Platform<br />Sun Certified Programmer For Java 2 Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 3th day with ant , help please