ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <shenne...@goldenhourdata.com>
Subject RE: example behavior of <outofdate> using <mapper>?
Date Mon, 09 Jun 2003 16:07:20 GMT
Peter,

Afraid the same is true as well for your example ( needed a little editing )
which faulted on verbose attribute also..

[ begin file prilley.xml ]
<project name="t" default="t" basedir="..">
  <property name="build.dir" value="tstbuild"/>
  <property name="src.dir" value="tstsrc"/>
   <taskdef resource="net/sf/antcontrib/antcontrib.properties">
     <classpath>
       <pathelement
location="C:/Tools/ant-contrib-0.3/lib/ant-contrib-0.3.jar" />
     </classpath>
   </taskdef>
  <target name="i.nm">
  <delete quiet="yes" dir="${src.dir}"/>
  <delete quiet="yes" dir="${build.dir}"/>

  <mkdir  dir="${src.dir}/acme"/>
  <mkdir  dir="${build.dir}/acme"/>

  <touch  file="${src.dir}/acme/1.xml"        millis="1000"/>
  <touch  file="${build.dir}/acme/index.html" millis="2000"/>
  <touch  file="${src.dir}/acme/2.xml"        millis="3000"/>
  <touch  file="${build.dir}/acme/1.html"     millis="4000"/>
  </target>
  <target name="t" depends="i.nm">
    <outofdate
      outputsources="output.sources"
      outputtargets="output.targets" >
      <sourcefiles>
        <fileset dir="${src.dir}" includes="**/*.xml"/>
      </sourcefiles>
      <targetfiles path="${build.dir}/index.html"/>
      <mapper type="glob" dir="${src.dir}"
              from="*.xml" to="${build.dir}/*.html"/>
      <sequential>
        <echo>sources ${output.sources}</echo>
        <echo>targets ${output.targets}</echo>
      </sequential>
    </outofdate>
  </target>
</project>
[ end file ]
Build sequence for target `t' is [i.nm, t]
Complete build sequence is [i.nm, t]

i.nm:
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstsrc
   [delete] Deleting C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme\1.xml
   [delete] Deleting C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme\2.xml
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstsrc
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstbuild
   [delete] Deleting C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme\1.html
   [delete] Deleting C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme\index.html
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme
   [delete] Deleting directory C:\Wrk\WSean\Prj\SCM-Test\tstbuild
    [mkdir] Created dir: C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme
    [mkdir] Created dir: C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme
    [touch] Creating C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme\1.xml
    [touch] Creating C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme\index.html
    [touch] Creating C:\Wrk\WSean\Prj\SCM-Test\tstsrc\acme\2.xml
    [touch] Creating C:\Wrk\WSean\Prj\SCM-Test\tstbuild\acme\1.html

t:

BUILD FAILED
file:C:/Wrk/WSean/Prj/SCM-Test/4.bin/prilley.xml:24: The <mapper> data type
doesn't support the "dir" attribute.
	at
org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.ja
va:422)
	at org.apache.tools.ant.ProjectHelper.configure(ProjectHelper.java:306)
	at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.
java:242)
	at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.
java:211)

-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com]
Sent: Monday, June 09, 2003 8:38 AM
To: Ant Users List
Subject: Re: example behavior of <outofdate> using <mapper>?


On Monday 09 June 2003 16:09, W. Sean Hennessy wrote:
> No sorry, "The <mapper> data type doesn't support the "dir" attribute"

The <mapper> sub-element in <outofdate> is a sub-class of ant's
mapper type. It supports the "dir" attribute to allow use of
the path type for <sourcefiles/>. A path may consisit
of a number of file sets, each with its own "dir".

Please try the build script I sent, it should work
with the mod for windows should below.

Cheers,

Peter

> and already tried both forms of ${file.separator} and "/" on windows.
>
> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com]
> Sent: Monday, June 09, 2003 1:23 AM
> To: Ant Users List
> Subject: Re: example behavior of <outofdate> using <mapper>?
>
> On Monday 09 June 2003 09:18, peter reilly wrote:
> >       <mapper type="glob" dir="src"
> >               from="*.xml" to="${build.dir}/*.html"/>
>
> Opps, this should be:
>       <mapper type="glob" dir="src"
>               from="*.xml" to="${build.dir}${file.separator}*.html"/>
>
> Note: I have not tested this on windows ;-)
>
> Cheers,
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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




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


Mime
View raw message