Tasks from ant-contrib are "RED" and not runnable from IDE (version 10)
I tried adding ant-contrib.jar as additional classpath to build.xml and then added to ~INSTALLDIR/Jetbrains/Intellij~version/lib/ant/lib. Neither took care of the issue. Build will run from command line.Example of issue
is <foreach task
Any suggestions?
Please sign in to leave a comment.
Hi.
For me the following is green, providing that the path to ant-contrib is correct:
<project name="trib" default="default">
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="../lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="default">
<foreach/>
</target>
</project>
Regards,
Alexander.
(And no additional classpath is required.)
for me adding to ant\lib works for not-bundled ant.
regards, Alex
Thanks for your help.. I had only antlib.xml in buildfile. As in:
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath refid="additional.jars"/>
</taskdef>
I added the antcontrib.jar to the <IntelliJ-Home>\\lib\ant directory and then added this library to my global library list.
Then IntelliJ recognized the antcontrib tags in my build file and didn't flag them as errors and also I was able to run my ant file from IntelliJ and it used the jar file.