You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by coluf <co...@hotmail.com> on 2004/02/18 04:19:07 UTC

and manifest.mf

Hi all

Being new to Ant, I am not sure whether the behaviour that I have seen should be reported as a bug or not.

When I run the the following bit of code, the build number in the 'manifest.mf' file is always one less than the 
build number in the 'build.number' file.  The <buildnumber/> command increments the build number 
correctly but does not update the running Ant environment.


Is this a bug?  I would think so.


_____________________________________________________________
   <target name="jar" depends="init, ${jar.filename}, ${zip.src.filename}, ${jar.tst.filename}"
            description="Creates jar files">
   </target>

   <target name="${jar.filename}" depends="${manifest.src}">
      <jar destfile="${build.dir}/${jar.filename}"
               basedir="${build.src.dir}"
               update="false"
               compress="true"
               index="true"
               manifest="${manifest.src}">
      </jar>
   </target>

   <target name="${manifest.src}">
      <buildnumber/>
      <manifest file="${manifest.src}" mode="replace">
         <attribute name="Built-By" value="${user.name}"/>
         <attribute name="Specification-Title" value="customer service"/>
         <attribute name="Specification-Version" value="${version}"/>
         <attribute name="Implementation-Version" value="${DSTAMP}, ${TSTAMP}, build ${build.number}"/>
      </manifest>
   </target>

Re: and manifest.mf

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Wed, 18 Feb 2004 14:19:07 +1100, coluf <co...@hotmail.com> wrote:

> Hi all
>
> Being new to Ant, I am not sure whether the behaviour that I have seen 
> should be reported as a bug or not.
>
> When I run the the following bit of code, the build number in the 
> 'manifest.mf' file is always one less than the
> build number in the 'build.number' file.  The <buildnumber/> command 
> increments the build number
> correctly but does not update the running Ant environment.
>
>
> Is this a bug?  I would think so.
>

No - from the buildnumber documentation:

"It will first attempt to read a build number from a file (by default, 
build.number in the current directory), then set the property build.number 
to the value that was read in (or to 0, if no such value). It will then 
increment the number by one and write it back out to the file."

So the property is set to the current value and the next value is written 
out.

Conor

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org