Labelling(versioning) the Ant build

Posted on 2004-10-21
Last Modified: 2010-04-06

 I have been trying to label the version of builds which I am making. I could time stamp them but I am not able to figure out how to label the builds with that info. Or is there any other option?
Question by:anilyitta
    1 Comment
    LVL 3

    Accepted Solution

    Well, there are several places/ways to put the info.

    One case is make project properties file with PropertyFile task, and add the build number Property to it.

    If timestamp is what you need, it could be something like:
        comment="My properties">
      <entry  key="adate" type="date" value="now"/>
      <entry  key="" type="date" value="now" pattern="DDD HH:mm"/>

    will produce a file with the following content:

    #Thu Nov 02 23:41:47 EST 2000
    adate=2000/11/02 23\:41 17\:34

    This task should be placed within another task, of course, which executes whenever you want to build the project.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now