The moose likes Ant, Maven and Other Build Tools and the fly likes ANT noob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT noob" Watch "ANT noob" New topic

ANT noob

Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 230
I am trying to create my first ANT build file. I am pretty close but a couple of things are not working right that I need help with.

1) When the jar file is created it is putting it in basedir from the project node rather than in destpath specified in the jar node. What am I doing wrong?

2) I am trying to include a serial number so can get a unique one with each build. Entry is a mystery to me as I don't know where it stores the previous number to increment on each build. I assume somewhere in the workspace. Anyway it seems to randomly restart at 1 during my testing. It must be something I'm doing but I don't know what so I can't stop. In any case I'd really like to be able to initialize that number then have it increment from there on.

3) In playing around with the serialnumber, I discovered that when the number is >999 the property is written with commas (e.g. 2,134). How do I eliminate those as I want just 2134.

I agree. Here's the link:
subject: ANT noob
jQuery in Action, 3rd edition