• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

3th day with ant , help please  RSS feed

clojure forum advocate
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}" />
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??
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!