ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject <foreach> task problem.
Date Wed, 23 Jun 2004 10:52:14 GMT
Hi,

I am using the <foreach> task to search
for all html files in a directory and use
the <java> task to run the Jtidy utilty 
to convert all html files to xhtml.

I have downloaded the ant-contrib file and
put that into ant/lib directory.

This is the piece of code

......
......
<taskdef
resource="net/sf/antcontrib/antcontrib.properties">
  <classpath>
    <pathelement
location="D:\deepak\buildProcess_2\_tools\ant-1.5\lib\ant-contrib-1.0b1.jar"/>
  </classpath>
</taskdef>

<property name="deploy.home"
location="D:\deepak\buildProcess_2\logging\build\test\report\logging\findbugs\dcx"/>
<property name="tidy.output.file"
value="output_tidy.txt"/>

<foreach param="msg" target="run_tidy">
        <path>       
            <fileset
dir="${build.test.report}/${component}/findbugs/dcx">
                <include name="**/*.html"/> 
            </fileset>
    </path>
    </foreach>
</target>


<target name="run_tidy">    
    <echo file="${tidy.output.file}" append="yes">
    ********* ${msg}
    </echo>
    <exec executable="java org.w3c.tidy.Tidy">
        <arg value="${msg}  &gt;&gt;
${tidy.output.file} 2&gt;&amp;1" />
    </exec> 
</target>

I got this piece of code from
http://home.zonnet.nl/rhjlie/developer/ant.htm

when i run ant build, I get the error 
D:\deepak\buildProcess_2\logging>ant findbugs
The input line is too long.
The syntax of the command is incorrect.

If I delete ant-contrib-1.0b1.jar and replace with
ant-contrib-0.3.jar
then I get the error

D:\deepak\buildProcess_2\logging>ant findbugs
Buildfile: build.xml
  [taskdef] Could not load definitions from resource
tasks.properties. It could not be found.

findbugs:

BUILD FAILED
file:D:/deepak/buildProcess_2/_setup/docs.xml:242: The
<foreach> task doesn't support the nested "path"
element.

Total time: 3 seconds

If I dont delete the ant-contrib-1.0b1.jar file from
ant/lib, i
get the error 
The input line is too long.
The syntax of the command is incorrect.

I am using ant version 1.5.

Where could the problem be? Is something wrong
with the ant-contrib version.

Some one suggest some solution.

bye,
with regards,
Deepak.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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


Mime
View raw message