unable to resolve class org.apache.commons.net.ftp in grails

1.4k views Asked by At

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?

1

There are 1 answers

0
defectus On BEST ANSWER

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 (section grails.project.dependency.resolution.plugins)

compile 'commons-net:commons-net:3.3'