Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Read file from ftp server
what are the dependencies for FTPClient in liferay 7 ?
Assuming 7.0 here. We use the apache libraries. e.g.
Java:
import org.apache.commons.net.ftp.FTPClient;
build.gradle:
compile group: 'commons-net', name: 'commons-net', version: '3.5'
If commons-net is missing, you need to deploy it on the Liferay server. If you just need it in that one module, you probably want to use "compileInclude" instead of "compile".
Christoph Rabel<p>Assuming 7.0 here. We use the apache libraries. e.g.</p>Hi following is my build.gradle
<p>Java:</p>
<p>import org.apache.commons.net.ftp.FTPClient;</p>
<p> </p>
<p>build.gradle:</p>
<p> compile group: 'commons-net', name: 'commons-net', version: '3.5'</p>
<p> </p>
<p>If commons-net is missing, you need to deploy it on the Liferay
server. If you just need it in that one module, you probably want to
use "compileInclude" instead of "compile".</p>
dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'commons-net', name: 'commons-net', version: '3.6'
}
but if i use
FTPClient ftpClient = new FTPClient();
my module is not deploying.
Please help me
but if i use FTPClient ftpClient = new FTPClient(); my module is not deploying.
What package is it waiting on? If you don't know how to determine that using Gogo shell, then if you follow David's blog post on Finding Bundle Dependencies to list out the packages your code is asking for, what does it say?