defineset and refid

  • clem

    While attempting to create a defineset that I'd planned to reference multiple times, I created a freestanding defineset such as the following:

    <defineset id="">
    <define name="PRODUCT_VERSION" value="${product_version}"/>
    <define name="BUILD_NUMBER" value="${build.number}"/>
    <define name="PATCH_LEVEL" value="${patch.level}"/>

    This is then referenced later on.  However, I'm getting the following error when building:

    Not an actual task, but looks like one for documentation purposes

    Is it possible to create a defineset outside a cc task?  It would be very handy if this were possible in the same way the defining a freestanding classpath or fileset is useful.

    • Curt Arnold
      Curt Arnold

      I added a request for enhancement:

      That will put it on my todo list, but I'm occupied at the moment trying to get another project out and won't be able to address it for two weeks at best and maybe much longer.

      I have to play some tricks to get Ant's automatic documentation to generate the documentation for defineset which was the reason for the message you saw.  defineset was never intended to be executed as a task, but was defined as a task to get the docs generated.

      The compiler elements were designed for reuse and referencing and extension and can contain definesets.  Maybe you can achieve what you were trying by using that mechanism.  For example,

      <compiler name="${compiler}" id="compile-with-version">

            <compiler extends="compile-with-version">
                 <!-- add more stuff here  -->