Table of Contents

IDEA - Ant (Cannot resolve symbol sshexec, Scp)

About

When using an out of the box Idea installation and scripting an ant build file, you may get the following error:

Cannot resolve symbol sshexec
Cannot resolve symbol scp

Ant Idea Cannot Resolve Scp

Why

This is because the additional jar that needs this task ie jsch-0.1.55.jar is not in the class path.

A lot of ant task needs additional jar to be able to run. The steps below will show you how to install all of them.

Steps

Install ant

Why ? because:

See install the additional jars

Install the additional jars in the user scope

cd %ANT_HOME%
ant -f fetch.xml -Ddest=user
echo %USERPROFILE%\.ant\lib
C:\Users\userName\.ant\lib

Ant Additional Jar User Lib

Restart Idea

Idea reads the directory C:\Users\userName\.ant\lib at start time, you need them to restart Intellij.

Solved ..

Idea Ant Scp Problem Solved