Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

3th day with ant , help please

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic