I am developing a module in which some file need to be uploaded on a ftp server for that I have added the "commons-net-3.3.jar" in my grails app & while using it
import org.apache.commons.net.ftp.FTP
import org.apache.commons.net.ftp.FTPClient
import org.apache.commons.net.ftp.FTPClientConfig
import org.apache.commons.net.ftp.FTPFile
import org.apache.commons.net.ftp.FTPReply
It is throwing the error unable to resolve class org.apache.commons.net.ftp.FTPReply. In ggts I am able to see all the classes of this package but it throw the error at runtime. What can be the possible solution for this?
In Grails you rarely add jar files to the project, you normally add dependencies. In your case you should add this line to the
BuildConfig.groovy
(sectiongrails.project.dependency.resolution.plugins
)