Hi All,
I am wanting to use for-loop task that is available through ant-contrib.jar but
I am getting the error message that is pasted below. By reading the old threads
on similar problem
(http://www.mail-archive.com/[email protected]/msg23803.html), I feel that
this could be a classpath issue. Any suggestions to fix this problem?
Due thanks for any help!
Ritu
P.S. : I am using Eclipse IDE versions 3.3, Ant version 1.8.0, and
ant-contrib-1.0b2.
Error Message =
BUILD FAILED
C:\AMMA\Eclipse3.3\PDSL\Automate.xml:33: The following error occurred while
executing this line:
jar:file:C:/Documents%20and%20Settings/ritu/.ant/lib/ant-contrib.jar!/net/sf/antcontrib/antlib.xml:3:
taskdef A class needed by class net.sf.antcontrib.platform.ShellScriptTask
cannot be found: ExecTask
using the classloader AntClassLoader[]
Code Snippet =
<project name="Automate" xmlns:ac="antlib:net.sf.antcontrib">
<typedef resource="net/sf/antcontrib/antlib.xml" classpath="C:/Documents
and Settings/ritu/.ant/ant-contrib.jar"/>
<loadfile property="src" srcfile="${to}_0.pdsl"/>
<ac:for param="line" list="${srcfile}"
delimiter="${line.separator}">
<sequential>
<mymacro line="@{line}"/>`
</sequential>
</ac:for>
Diagnostics information =
C:\AMMA\Eclipse3.3\PDSL>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.8.0 compiled on February 1 2010
-------------------------------------------
Implementation Version
-------------------------------------------
core tasks : 1.8.0 in file:/C:/Program%20Files/apache-ant-1.8.0/lib/ant.jar
optional tasks : 1.8.0 in
file:/C:/Program%20Files/apache-ant-1.8.0/lib/ant-nodeps.jar
-------------------------------------------
ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.8.0 compiled on February 1 2010
ant.java.version: 1.6
ant.core.lib: C:\Program Files\apache-ant-1.8.0\lib\ant.jar
ant.home: C:\Program Files\apache-ant-1.8.0
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\Program Files\apache-ant-1.8.0
ant-antlr.jar (5747 bytes)
ant-apache-bcel.jar (8749 bytes)
ant-apache-bsf.jar (3931 bytes)
ant-apache-log4j.jar (3047 bytes)
ant-apache-oro.jar (39646 bytes)
ant-apache-regexp.jar (3761 bytes)
ant-apache-resolver.jar (4074 bytes)
ant-apache-xalan2.jar (2293 bytes)
ant-commons-logging.jar (3913 bytes)
ant-commons-net.jar (85161 bytes)
ant-jai.jar (22249 bytes)
ant-javamail.jar (7855 bytes)
ant-jdepend.jar (8265 bytes)
ant-jmf.jar (6720 bytes)
ant-jsch.jar (40120 bytes)
ant-junit.jar (101222 bytes)
ant-launcher.jar (12277 bytes)
ant-netrexx.jar (9948 bytes)
ant-nodeps.jar (402003 bytes)
ant-stylebook.jar (2333 bytes)
ant-swing.jar (7537 bytes)
ant-testutil.jar (15121 bytes)
ant-trax.jar (8371 bytes)
ant.jar (1506140 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)
-------------------------------------------
USER_HOME/.ant/lib jar listing
-------------------------------------------
user.home: C:\Documents and Settings\ritu
ant-contrib.jar (115287 bytes)
-------------------------------------------
Tasks availability
-------------------------------------------
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.Logger
wlrun : Not Available (the implementation class is not present)
scp : Missing dependency com.jcraft.jsch.Logger
stlist : Not Available (the implementation class is not present)
sshsession : Missing dependency com.jcraft.jsch.Logger
starteam : Not Available (the implementation class is not present)
stlabel : Not Available (the implementation class is not present)
jdepend : Missing dependency jdepend.xmlui.JDepend
stcheckin : Not Available (the implementation class is not present)
stcheckout : Not Available (the implementation class is not present)
ejbc : Not Available (the implementation class is not present)
wlstop : Not Available (the implementation class is not present)
ddcreator : Not Available (the implementation class is not present)
A task being missing/unavailable should only matter if you are trying to use it
-------------------------------------------
org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/
-------------------------------------------
XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location:
file:/C:/Program%20Files/apache-ant-1.8.0/lib/xercesImpl.jar
Namespace-aware parser : org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
Namespace-aware parser Location:
file:/C:/Program%20Files/apache-ant-1.8.0/lib/xercesImpl.jar
-------------------------------------------
XSLT Processor information
-------------------------------------------
Big Picture =
What I am trying to do with the ant script is as follows:
I am searching for certain lines in a file, and if the lines are found they
should be written to an output file. Because I need to write each matching line
in a separate file, I am using a for-loop. A sample scenario:
1) Content of File.asl =
readInt(x)
readInt(y)
readDouble(z)
writeInt(x)
sumInt(x,y)
2) Run ant script and extract lines with read* and write them to separate files.
Contents of output1.asl =
readInt(x)
Contents of output2.asl =
readInt(y)
Contents of output3.asl =
readDouble(z)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]