[hidden email] wrote:
> Hi there,
>
> is it possible to access the buildnumber in the ant script?
Just so others know, the build number is available to the build via
BUILD_NUMBER environment variable, along with a few other variables. See
the configuration page for the list of all variables.
> Or better, to increment a file in the cvs/svn with the current
> buildnumber?
I guess you mean updating a file by the build number, then commit it
back to the SCM.
I'm curious how you fix the chicken and egg problem with that. That
change would trigger another build, isn't it?
> I ask because it is possible to define a file in anthill, where the current buildnumber is written and commited to the cvs.
> With this mechanism we can add the versionnumber/buildnumber to the application builded, and display them e.g. to the user.
In my projects, I access the build number environment variable from Ant
and bake that into the jar file that's built, which in turns show up
when they run "xjc -version".
--
Kohsuke Kawaguchi
Sun Microsystems
[hidden email]