How to declare an external task for Ant in IDEA?

I want to declare a task to run TestNG tests. I defined a taskdef tag like this

]]>


I also added testng-4.7beta-jdk15.jar to Global Library. But IDEA shows an error: "Cannot resolve symbol 'testng-4.7beta-jdk15.jar'".

How to fix it? Thanks

Please sign in to leave a comment.