Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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.
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!