You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Ciramella, EJ" <EC...@emptoris.com> on 2003/03/18 23:58:09 UTC

Uptodate - need some help...

could someone give me a little guidance using the uptodate task?  I'm trying
to compare a set of jars against the build directory to see if the classes
are newer than the jars.

Re: Uptodate - need some help...

Posted by webhiker <we...@tiscali.fr>.
I think this is done automagically by the Jar task anyway.
  At least it seems to be for mine :

    <target name="jar" depends="stub">
         <echo message="Checking jar for ${ant.project.name} 
(${jar.file})" />
	<jar jarfile="${jar.file}" update="yes">
          <fileset dir="${classes.dir}" />
          <fileset dir="${metadata.dir}" >
            <include name="**/*.properties"/>
            <include name="**/*.css"/>
          </fileset>
          <zipfileset dir="${image.dir}" prefix="images"/>
          <manifest>
            <attribute name="Built-By" value="${user.name}"/>
            <attribute name="Main-class" 
value="${package.name}.${main.class}"/>
            <attribute name="Class-path" value="lib/GuibioMiRe.jar 
lib/linguisticServices.jar lib/jaxb-api.jar lib/jaxb-ri.jar 
lib/jaxb-libs.jar lib/jaxb-xjc.jar lib/log4j-1.2.5.jar lib/jgraph.jar 
lib/jlfgr-1_0.jar lib/dom4j.jar "/>
          </manifest>
         </jar>
</target>




Ciramella, EJ wrote:
> could someone give me a little guidance using the uptodate task?  I'm trying
> to compare a set of jars against the build directory to see if the classes
> are newer than the jars.
> 



Re: Uptodate - need some help...

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
However, you may want to have something conditional on the JAR actually 
changing, like perhaps deploying it somewhere or sending an e-mail if 
it has changed.  So use this as an example of how <uptodate> works, not 
necessarily as a way to bypass using <jar>.  :))

	Erik


On Wednesday, March 19, 2003, at 04:11  AM, peter reilly wrote:

> From the "book" Java Dev with ant:
>
> <uptodate property="jar.uptodate">
>     <srcfiles dir="classes" includes="**/*.class"/>
>     <mapper type="merge" to="${dist.dir}/product.jar"/>
> </uptodate>
>
> However, the jar task does this already...
>
> Peter.
> On Tuesday 18 March 2003 22:58, Ciramella, EJ wrote:
>> could someone give me a little guidance using the uptodate task?  I'm
>> trying to compare a set of jars against the build directory to see if 
>> the
>> classes are newer than the jars.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


Re: Uptodate - need some help...

Posted by peter reilly <pe...@corvil.com>.
From the "book" Java Dev with ant:

<uptodate property="jar.uptodate">
    <srcfiles dir="classes" includes="**/*.class"/>
    <mapper type="merge" to="${dist.dir}/product.jar"/>
</uptodate>

However, the jar task does this already...

Peter.
On Tuesday 18 March 2003 22:58, Ciramella, EJ wrote:
> could someone give me a little guidance using the uptodate task?  I'm
> trying to compare a set of jars against the build directory to see if the
> classes are newer than the jars.